Skip to content
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

Merged
merged 5 commits into from
Jan 19, 2018
Merged

Conversation

kuke
Copy link
Contributor

@kuke kuke commented Jan 18, 2018

Resolve #7641

@kuke
Copy link
Contributor Author

kuke commented Jan 18, 2018

2018-01-18 9 05 04


hidden_dim = 512
forward_proj = fluid.layers.fc(input=input_seq, size=hidden_dim * 4,
act='tanh', bias_attr=True)
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

@pkuyym pkuyym Jan 18, 2018

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.

Copy link
Contributor Author

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

@kuke kuke merged commit 41b8388 into PaddlePaddle:develop Jan 19, 2018
@pkuyym pkuyym mentioned this pull request Jan 23, 2018
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants