Skip to content

Conversation

@kuke
Copy link
Contributor

@kuke kuke commented Jan 18, 2018

Resolve #7641

@kuke kuke requested review from luotao1, pkuyym and qingqing01 January 18, 2018 03:24
@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