@@ -160,10 +160,12 @@ def _add_seq2seq(self):
160160 self ._next_device ()):
161161 cell_fw = tf .nn .rnn_cell .LSTMCell (
162162 hps .num_hidden ,
163- initializer = tf .random_uniform_initializer (- 0.1 , 0.1 , seed = 123 ))
163+ initializer = tf .random_uniform_initializer (- 0.1 , 0.1 , seed = 123 ),
164+ state_is_tuple = False )
164165 cell_bw = tf .nn .rnn_cell .LSTMCell (
165166 hps .num_hidden ,
166- initializer = tf .random_uniform_initializer (- 0.1 , 0.1 , seed = 113 ))
167+ initializer = tf .random_uniform_initializer (- 0.1 , 0.1 , seed = 113 ),
168+ state_is_tuple = False )
167169 (emb_encoder_inputs , fw_state , _ ) = tf .nn .bidirectional_rnn (
168170 cell_fw , cell_bw , emb_encoder_inputs , dtype = tf .float32 ,
169171 sequence_length = article_lens )
@@ -188,7 +190,8 @@ def _add_seq2seq(self):
188190
189191 cell = tf .nn .rnn_cell .LSTMCell (
190192 hps .num_hidden ,
191- initializer = tf .random_uniform_initializer (- 0.1 , 0.1 , seed = 113 ))
193+ initializer = tf .random_uniform_initializer (- 0.1 , 0.1 , seed = 113 ),
194+ state_is_tuple = False )
192195
193196 encoder_outputs = [tf .reshape (x , [hps .batch_size , 1 , 2 * hps .num_hidden ])
194197 for x in encoder_outputs ]
0 commit comments