From 9c42d904689ea71f57f17b802ae7006d6bf37816 Mon Sep 17 00:00:00 2001 From: wangyang59 Date: Wed, 1 Feb 2017 15:02:12 -0800 Subject: [PATCH] add comments in gru_step_layer of layers.py to explain the parameter location --- python/paddle/trainer_config_helpers/layers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 770d6303c13..14035ce3fd8 100644 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -2707,8 +2707,7 @@ def gru_step_layer(input, :param gate_act: :param bias_attr: :param param_attr: the parameter_attribute for transforming the output_mem - from previous step. It is instead grouped with input due - to backward model compatibility. + from previous step. :param layer_attr: :return: LayerOutput object. :rtype: LayerOutput @@ -2719,6 +2718,11 @@ def gru_step_layer(input, Layer( name=name, type=LayerType.GRU_STEP_LAYER, + # The parameter here is for transforming the output_mem. The input has + # already been transformed outside this module so it does not need + # parameter associated with it. + # The parameter here is instead grouped with input is due to + # backward model compatibility. inputs=[Input(input.name, **param_attr.attr), output_mem.name], bias=ParamAttr.to_bias(bias_attr), size=size, -- GitLab