Skip to content

Commit

Permalink
Remove unused states_seq
Browse files Browse the repository at this point in the history
  • Loading branch information
dniku authored and yhn112 committed Jan 24, 2020
1 parent f158248 commit 010b778
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions week07_seq2seq/basic_model_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,9 @@ def step(blob, y_prev):

# add initial state and logits
logits_seq = tf.concat((first_logits[None], logits_seq), axis=0)
states_seq = [tf.concat((init[None], states), axis=0)
for init, states in zip(first_state, states_seq)]

# convert from [time,batch,...] to [batch,time,...]
logits_seq = tf.transpose(logits_seq, [1, 0, 2])
states_seq = [tf.transpose(states, [1, 0] + list(range(2, states.shape.ndims)))
for states in states_seq]

return tf.nn.log_softmax(logits_seq)

Expand Down

0 comments on commit 010b778

Please sign in to comment.