Remove unnecessary tf.exp
This commit is contained in:
parent
33c1014549
commit
fee2c48d3f
@ -1056,7 +1056,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" attention_plot[i] = tf.reshape(attention_weights, (-1, )).numpy()\n",
|
" attention_plot[i] = tf.reshape(attention_weights, (-1, )).numpy()\n",
|
||||||
"\n",
|
"\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",
|
||||||
" result.append(index_word[predicted_id])\n",
|
" result.append(index_word[predicted_id])\n",
|
||||||
"\n",
|
"\n",
|
||||||
" if index_word[predicted_id] == '<end>':\n",
|
" if index_word[predicted_id] == '<end>':\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user