Skip to content

Commit 451bc3a

Browse files
committed
Correct the use of the lstm layer
1 parent 831909c commit 451bc3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/paddle/fluid/tests/book/test_label_semantic_roles.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def db_lstm(word, predicate, ctx_n2, ctx_n1, ctx_0, ctx_p1, ctx_p2, mark,
7676
emb_layers.append(mark_embedding)
7777

7878
hidden_0_layers = [
79-
fluid.layers.fc(input=emb, size=hidden_dim, act='tanh')
79+
fluid.layers.fc(input=emb, size=hidden_dim)
8080
for emb in emb_layers
8181
]
8282

@@ -94,8 +94,8 @@ def db_lstm(word, predicate, ctx_n2, ctx_n1, ctx_0, ctx_p1, ctx_p2, mark,
9494

9595
for i in range(1, depth):
9696
mix_hidden = fluid.layers.sums(input=[
97-
fluid.layers.fc(input=input_tmp[0], size=hidden_dim, act='tanh'),
98-
fluid.layers.fc(input=input_tmp[1], size=hidden_dim, act='tanh')
97+
fluid.layers.fc(input=input_tmp[0], size=hidden_dim),
98+
fluid.layers.fc(input=input_tmp[1], size=hidden_dim)
9999
])
100100

101101
lstm = fluid.layers.dynamic_lstm(

0 commit comments

Comments
 (0)