diff options
Diffstat (limited to 'tensorflow/models/rnn/ptb/ptb_word_lm.py')
-rw-r--r-- | tensorflow/models/rnn/ptb/ptb_word_lm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/models/rnn/ptb/ptb_word_lm.py b/tensorflow/models/rnn/ptb/ptb_word_lm.py index 41b67d8b24..78890a4a3e 100644 --- a/tensorflow/models/rnn/ptb/ptb_word_lm.py +++ b/tensorflow/models/rnn/ptb/ptb_word_lm.py @@ -129,9 +129,9 @@ class PTBModel(object): states.append(state) output = tf.reshape(tf.concat(1, outputs), [-1, size]) - logits = tf.nn.xw_plus_b(output, - tf.get_variable("softmax_w", [size, vocab_size]), - tf.get_variable("softmax_b", [vocab_size])) + softmax_w = tf.get_variable("softmax_w", [size, vocab_size]) + softmax_b = tf.get_variable("softmax_b", [vocab_size]) + logits = tf.matmul(output, softmax_w) + softmax_b loss = seq2seq.sequence_loss_by_example([logits], [tf.reshape(self._targets, [-1])], [tf.ones([batch_size * num_steps])], |