diff options
author | Ruizhi <yang.rayzhi@gmail.com> | 2018-08-14 10:07:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 10:07:53 +0800 |
commit | 33c10145490d113e125847142ce0d9f05d9775d3 (patch) | |
tree | 6d2f103cba0948e8b0e0813535f04cbfd60f5972 /tensorflow/contrib/eager | |
parent | f0b3a02cb76be13364d0247b0162c23482778f9c (diff) |
Remove unnecessary tf.exp
Diffstat (limited to 'tensorflow/contrib/eager')
-rw-r--r-- | tensorflow/contrib/eager/python/examples/generative_examples/text_generation.ipynb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/eager/python/examples/generative_examples/text_generation.ipynb b/tensorflow/contrib/eager/python/examples/generative_examples/text_generation.ipynb index b173f856c6..38358b444a 100644 --- a/tensorflow/contrib/eager/python/examples/generative_examples/text_generation.ipynb +++ b/tensorflow/contrib/eager/python/examples/generative_examples/text_generation.ipynb @@ -621,7 +621,7 @@ "\n", " # using a multinomial distribution to predict the word returned by the model\n", " predictions = predictions / temperature\n", - " predicted_id = tf.multinomial(tf.exp(predictions), num_samples=1)[0][0].numpy()\n", + " predicted_id = tf.multinomial(predictions, num_samples=1)[0][0].numpy()\n", " \n", " # We pass the predicted word as the next input to the model\n", " # along with the previous hidden state\n", |