Remove unnecessary tf.exp

This commit is contained in:
Ruizhi 2018-08-14 10:28:06 +08:00 committed by GitHub
parent 33c1014549
commit fee2c48d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1056,7 +1056,7 @@
"\n",
" attention_plot[i] = tf.reshape(attention_weights, (-1, )).numpy()\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",
"\n",
" if index_word[predicted_id] == '<end>':\n",