浏览代码

Revert "fixed a bug in sampled_loss(), made compatible for 0.12.0"

Neal Wu 8 年之前
父节点
当前提交
79d2ecb102
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tutorials/rnn/translate/seq2seq_model.py

+ 1 - 1
tutorials/rnn/translate/seq2seq_model.py

@@ -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(inputs, labels):
+      def sampled_loss(labels, inputs):
         labels = tf.reshape(labels, [-1, 1])
         # We need to compute the sampled_softmax_loss using 32bit floats to
         # avoid numerical instabilities.