Commit 0079e98a authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Merge pull request #982 from arvind385801/hotfix/tranlate_tutorial

fixed a bug in sampled_loss(), made compatible for 0.12.0
parents fe9a4f5a 0d8916f4
......@@ -100,7 +100,7 @@ class Seq2SeqModel(object):
b = tf.get_variable("proj_b", [self.target_vocab_size], dtype=dtype)
output_projection = (w, b)
def sampled_loss(labels, inputs):
def sampled_loss(inputs, labels):
labels = tf.reshape(labels, [-1, 1])
# We need to compute the sampled_softmax_loss using 32bit floats to
# avoid numerical instabilities.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment