diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 617fbff948bf03098eca4a31f44d4ff05e73dbcf..ca0b5dbfbffd138ffaf6f3a17daf217fed69213c 100644 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -3592,10 +3592,9 @@ def lstm_step_layer(input, :type gate_act: BaseActivation :param state_act: State Activation Type. TanhActivation is the default. :type state_act: BaseActivation - :param bias_attr: The bias attribute. If the parameter is set to False or an object - whose type is not ParameterAttribute, no bias is defined. If the - parameter is set to True, the bias is initialized to zero. - :type bias_attr: ParameterAttribute | None | bool | Any + :param bias_attr: The bias attribute. If the parameter is set to + True or None, the bias is initialized to zero. + :type bias_attr: ParameterAttribute | None | True :param layer_attr: layer's extra attribute. :type layer_attr: ExtraLayerAttribute :return: LayerOutput object. diff --git a/python/paddle/trainer_config_helpers/networks.py b/python/paddle/trainer_config_helpers/networks.py index 3821d075cba5d39b5808a39093b8570d9302b667..a5e7aca24a23bf7011e03929578b7fa6807e8840 100644 --- a/python/paddle/trainer_config_helpers/networks.py +++ b/python/paddle/trainer_config_helpers/networks.py @@ -698,14 +698,16 @@ def lstmemory_unit(input, :param state_act: state activiation type of lstm. :type state_act: BaseActivation :param input_proj_bias_attr: bias attribute for input to hidden projection. - False means no bias, None means default bias. - :type input_proj_bias_attr: ParameterAttribute|False|None + False or None means no bias. If the parameter is set to True, + the bias is initialized to zero. + :type input_proj_bias_attr: ParameterAttribute|bool|None :param input_proj_layer_attr: extra layer attribute for input to hidden projection of the LSTM unit, such as dropout, error clipping. :type input_proj_layer_attr: ExtraLayerAttribute :param lstm_bias_attr: bias parameter attribute of lstm layer. - False means no bias, None means default bias. - :type lstm_bias_attr: ParameterAttribute|False|None + If the parameter is set to True or None, + the bias is initialized to zero. + :type lstm_bias_attr: ParameterAttribute|True|None :param lstm_layer_attr: extra attribute of lstm layer. :type lstm_layer_attr: ExtraLayerAttribute :return: lstmemory unit name. @@ -805,11 +807,13 @@ def lstmemory_group(input, :param state_act: state activiation type of lstm. :type state_act: BaseActivation :param lstm_bias_attr: bias parameter attribute of lstm layer. - False means no bias, None means default bias. - :type lstm_bias_attr: ParameterAttribute|False|None + If the parameter is set to True or None, the bias is + initialized to zero. + :type lstm_bias_attr: ParameterAttribute|True|None :param input_proj_bias_attr: bias attribute for input to hidden projection. - False means no bias, None means default bias. - :type input_proj_bias_attr: ParameterAttribute|False|None + False or None means no bias. If the parameter is set to True, + the bias is initialized to zero. + :type input_proj_bias_attr: ParameterAttribute|bool|None :param input_proj_layer_attr: extra layer attribute for input to hidden projection of the LSTM unit, such as dropout, error clipping. :type input_proj_layer_attr: ExtraLayerAttribute