Skip to content

Commit 5f7065f

Browse files
Update lstm_sentiment_analysis_layer.py
Enable training for lstm layer
1 parent dbd0334 commit 5f7065f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

深度学习与TensorFlow入门实战-源码和PPT/lesson47-LSTM实战/lstm_sentiment_analysis_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def call(self, inputs, training=None):
6969
x = self.embedding(x)
7070
# rnn cell compute
7171
# x: [b, 80, 100] => [b, 64]
72-
x = self.rnn(x)
72+
x = self.rnn(x,training=training)
7373

7474
# out: [b, 64] => [b, 1]
7575
x = self.outlayer(x)

0 commit comments

Comments
 (0)