-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add python doc for dynamic_lstm #7640
Conversation
python/paddle/v2/fluid/layers/nn.py
Outdated
|
||
hidden_dim = 512 | ||
forward_proj = fluid.layers.fc(input=input_seq, size=hidden_dim * 4, | ||
act='tanh', bias_attr=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that fc
only conduct linear projection, please double check whether it's correct to use act=tanh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkuyym I noticed that param act
is not used in fc
: https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/layers/nn.py#L63
So why didn't add activation in fc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are linear projections.
Note that these :math:
W_{xi}x_{t}, W_{xf}x_{t}, W_{xc}x_{t}, W_{xo}x_{t}
operations on the input :math:x_{t}
are NOT included in this operator.
Users can choose to use fully-connect layer before LSTM layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified the example, set act
and bias_attr
to None
Resolve #7641