Skip to content

Commit 7bae643

Browse files
committed
Remove unused states_seq
1 parent e7b0d60 commit 7bae643

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

week07_seq2seq/basic_model_tf.py

-4
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,9 @@ def step(blob, y_prev):
104104

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

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

115111
return tf.nn.log_softmax(logits_seq)
116112

0 commit comments

Comments
 (0)