Skip to content

Commit 1b6a54e

Browse files
fix error for annotation
1 parent f07a226 commit 1b6a54e

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

python/paddle/trainer_config_helpers/layers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3592,10 +3592,9 @@ def lstm_step_layer(input,
35923592
:type gate_act: BaseActivation
35933593
:param state_act: State Activation Type. TanhActivation is the default.
35943594
:type state_act: BaseActivation
3595-
:param bias_attr: The bias attribute. If the parameter is set to False or an object
3596-
whose type is not ParameterAttribute, no bias is defined. If the
3597-
parameter is set to True, the bias is initialized to zero.
3598-
:type bias_attr: ParameterAttribute | None | bool | Any
3595+
:param bias_attr: The bias attribute. If the parameter is set to
3596+
True or None, the bias is initialized to zero.
3597+
:type bias_attr: ParameterAttribute | None | True
35993598
:param layer_attr: layer's extra attribute.
36003599
:type layer_attr: ExtraLayerAttribute
36013600
:return: LayerOutput object.

python/paddle/trainer_config_helpers/networks.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -698,14 +698,16 @@ def lstmemory_unit(input,
698698
:param state_act: state activiation type of lstm.
699699
:type state_act: BaseActivation
700700
:param input_proj_bias_attr: bias attribute for input to hidden projection.
701-
False means no bias, None means default bias.
702-
:type input_proj_bias_attr: ParameterAttribute|False|None
701+
False or None means no bias. If the parameter is set to True,
702+
the bias is initialized to zero.
703+
:type input_proj_bias_attr: ParameterAttribute|bool|None
703704
:param input_proj_layer_attr: extra layer attribute for input to hidden
704705
projection of the LSTM unit, such as dropout, error clipping.
705706
:type input_proj_layer_attr: ExtraLayerAttribute
706707
:param lstm_bias_attr: bias parameter attribute of lstm layer.
707-
False means no bias, None means default bias.
708-
:type lstm_bias_attr: ParameterAttribute|False|None
708+
If the parameter is set to True or None,
709+
the bias is initialized to zero.
710+
:type lstm_bias_attr: ParameterAttribute|True|None
709711
:param lstm_layer_attr: extra attribute of lstm layer.
710712
:type lstm_layer_attr: ExtraLayerAttribute
711713
:return: lstmemory unit name.
@@ -805,11 +807,13 @@ def lstmemory_group(input,
805807
:param state_act: state activiation type of lstm.
806808
:type state_act: BaseActivation
807809
:param lstm_bias_attr: bias parameter attribute of lstm layer.
808-
False means no bias, None means default bias.
809-
:type lstm_bias_attr: ParameterAttribute|False|None
810+
If the parameter is set to True or None, the bias is
811+
initialized to zero.
812+
:type lstm_bias_attr: ParameterAttribute|True|None
810813
:param input_proj_bias_attr: bias attribute for input to hidden projection.
811-
False means no bias, None means default bias.
812-
:type input_proj_bias_attr: ParameterAttribute|False|None
814+
False or None means no bias. If the parameter is set to True,
815+
the bias is initialized to zero.
816+
:type input_proj_bias_attr: ParameterAttribute|bool|None
813817
:param input_proj_layer_attr: extra layer attribute for input to hidden
814818
projection of the LSTM unit, such as dropout, error clipping.
815819
:type input_proj_layer_attr: ExtraLayerAttribute

0 commit comments

Comments
 (0)