Skip to content

Conversation

@ranqiu92
Copy link
Contributor

@ranqiu92 ranqiu92 requested a review from dzhwinter December 25, 2017 12:16

for i in range(2, stacked_num + 1):
fc = fluid.layers.fc(input=inputs, size=hid_dim)
fc = fluid.layers.fc(input=inputs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format these lines

emb = fluid.layers.embedding(
input=data,
size=[input_dim, emb_dim],
param_attr=ParamAttr(initializer=NormalInitializer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loc default value is .0.


fc1 = fluid.layers.fc(input=emb,
size=hid_dim,
bias_attr=ParamAttr(initializer=NormalInitializer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a ParamAttr, and share it between layers.

input=fc1,
size=hid_dim,
candidate_activation='relu',
bias_attr=ParamAttr(initializer=NormalInitializer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same above

size=hid_dim,
is_reverse=(i % 2) == 0,
candidate_activation='relu',
bias_attr=ParamAttr(initializer=NormalInitializer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

prediction = fluid.layers.fc(
input=[fc_last, lstm_last],
size=class_dim,
bias_attr=ParamAttr(initializer=NormalInitializer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And these lines.

@ranqiu92 ranqiu92 closed this Mar 8, 2018
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.

2 participants