Skip to content

Commit 386a028

Browse files
author
Peng Li
committed
Ensure name is not set in bias_attr in gru_step_naive_layer
1 parent 5c5250e commit 386a028

File tree

1 file changed

+5
-0
lines changed
  • python/paddle/trainer_config_helpers

1 file changed

+5
-0
lines changed

python/paddle/trainer_config_helpers/layers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3679,6 +3679,11 @@ def gru_step_naive_layer(input,
36793679
if size is None:
36803680
size = input.size / 3
36813681

3682+
if bias_attr and bias_attr.attr.get("parameter_name", None) is not None:
3683+
raise ValueError("You should not specify the name of bias parameters. "
3684+
"Otherwise, the three bias will share the same "
3685+
"parameter matrix.")
3686+
36823687
def __gate__(gate_name, offset):
36833688
with mixed_layer(
36843689
name=name + "_" + gate_name,

0 commit comments

Comments
 (0)