aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/tutorials/recurrent/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/g3doc/tutorials/recurrent/index.md')
-rw-r--r--tensorflow/g3doc/tutorials/recurrent/index.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/g3doc/tutorials/recurrent/index.md b/tensorflow/g3doc/tutorials/recurrent/index.md
index 82b159c20a..3ab8061981 100644
--- a/tensorflow/g3doc/tutorials/recurrent/index.md
+++ b/tensorflow/g3doc/tutorials/recurrent/index.md
@@ -61,7 +61,7 @@ The basic pseudocode looks as follows:
lstm = rnn_cell.BasicLSTMCell(lstm_size)
# Initial state of the LSTM memory.
state = tf.zeros([batch_size, lstm.state_size])
-
+probabilities = []
loss = 0.0
for current_batch_of_words in words_in_dataset:
# The value of state is updated after processing each batch of words.
@@ -69,7 +69,7 @@ for current_batch_of_words in words_in_dataset:
# The LSTM output can be used to make next word predictions
logits = tf.matmul(output, softmax_w) + softmax_b
- probabilities = tf.nn.softmax(logits)
+ probabilities.append(tf.nn.softmax(logits))
loss += loss_function(probabilities, target_words)
```