Remove unnecessary tf.exp
This commit is contained in:
parent
f0b3a02cb7
commit
33c1014549
@ -621,7 +621,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" # using a multinomial distribution to predict the word returned by the model\n",
|
" # using a multinomial distribution to predict the word returned by the model\n",
|
||||||
" predictions = predictions / temperature\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",
|
" \n",
|
||||||
" # We pass the predicted word as the next input to the model\n",
|
" # We pass the predicted word as the next input to the model\n",
|
||||||
" # along with the previous hidden state\n",
|
" # along with the previous hidden state\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user