Skip to content

Commit 9374033

Browse files
Jingtian PengVijay Vasudevan
authored andcommitted
Fix the issue#4138 (tensorflow#4270)
1 parent dbe7ee0 commit 9374033

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tensorflow/models/rnn/translate/seq2seq_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ def __init__(self,
9595
softmax_loss_function = None
9696
# Sampled softmax only makes sense if we sample less than vocabulary size.
9797
if num_samples > 0 and num_samples < self.target_vocab_size:
98-
w = tf.get_variable("proj_w", [size, self.target_vocab_size], dtype=dtype)
99-
w_t = tf.transpose(w)
98+
w_t = tf.get_variable("proj_w", [self.target_vocab_size, size], dtype=dtype)
99+
w = tf.transpose(w_t)
100100
b = tf.get_variable("proj_b", [self.target_vocab_size], dtype=dtype)
101101
output_projection = (w, b)
102102

0 commit comments

Comments
 (0)