Skip to content

Commit d659d5e

Browse files
author
chengduozh
committed
fix lstm bias_attr doc
test=release/1.0.0
1 parent b0205fd commit d659d5e

File tree

1 file changed

+12
-5
lines changed
  • python/paddle/fluid/layers

1 file changed

+12
-5
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ def dynamic_lstm(input,
351351
c_0(Variable): The initial cell state is an optional input, default is zero.
352352
This is a tensor with shape (N x D), where N is the
353353
batch size. `h_0` and `c_0` can be NULL but only at the same time.
354-
355354
param_attr(ParamAttr|None): The parameter attribute for the learnable
356355
hidden-hidden weights.
357356
@@ -3131,10 +3130,18 @@ def lstm_unit(x_t,
31313130
cell_t_prev (Variable): The cell value of lstm unit, a 2-D tensor with
31323131
shape M x S, M for batch size and S for size of lstm unit.
31333132
forget_bias (float): The forget bias of lstm unit.
3134-
param_attr (ParamAttr): The attributes of parameter weights, used to set
3135-
initializer, name etc.
3136-
bias_attr (ParamAttr): The attributes of bias weights, if not False,
3137-
bias weights will be created and be set to default value.
3133+
param_attr(ParamAttr|None): The parameter attribute for the learnable
3134+
hidden-hidden weights.
3135+
If it is set to None or one attribute of ParamAttr,
3136+
lstm_unit will create ParamAttr as param_attr.
3137+
If the Initializer of the param_attr is not set, the
3138+
parameter is initialized with Xavier. Default: None.
3139+
bias_attr (ParamAttr|None): The bias attribute for the learnable bias
3140+
weights. If it is set to False, no bias will be added
3141+
to the output units. If it is set to None or one attribute of ParamAttr,
3142+
lstm_unit will create ParamAttr as bias_attr.
3143+
If the Initializer of the bias_attr is not set,
3144+
the bias is initialized zero. Default: None.
31383145
name(str|None): A name for this layer(optional). If set None, the layer
31393146
will be named automatically.
31403147

0 commit comments

Comments
 (0)