From 386a0289bda362edd6e7c85e69775ecc6156eba6 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Mon, 16 Oct 2017 14:50:04 +0800 Subject: [PATCH] Ensure name is not set in bias_attr in gru_step_naive_layer --- python/paddle/trainer_config_helpers/layers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 5043fb811de..962545093ca 100644 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -3679,6 +3679,11 @@ def gru_step_naive_layer(input, if size is None: size = input.size / 3 + if bias_attr and bias_attr.attr.get("parameter_name", None) is not None: + raise ValueError("You should not specify the name of bias parameters. " + "Otherwise, the three bias will share the same " + "parameter matrix.") + def __gate__(gate_name, offset): with mixed_layer( name=name + "_" + gate_name, -- GitLab