show-attend-and-tell
show-attend-and-tell copied to clipboard
error in train.py
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x7fbc2a5b0850>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True.
Traceback (most recent call last):
File "train.py", line 25, in
What is your tensorflow's version?
tensorflow (0.10.0rc0)
Sorry I was preoccupied, couldn't answer.
Try to replace that line with
_, (c, h) = lstm_cell(inputs=tf.concat([x[:,t,:], context], 1), state=[c, h])
Tensorflow updates the syntax.
You need to the same thing for line 209. Hope this helps.
Here I upload I changed part of the code and run it with 1.0,hope it is useful for you
Hi @lijianqing317, I was interested in your port. I tried running it with TF 1.0 but I noticed you don't include a ported core
folder. For example, tf.nn.rnn_cell.BasicLSTMCell
was moved to tf.contrib.rnn
in TF 1.0 and 1.1 (it's back in 1.2) but core/model.py
still uses it.
I'll try my hand at porting, but I don't know how extensive the changes are.
EDIT: My bad, I apparently glossed over model.py
. I'll give it a try.
@rubenvereecken hi,here is I changed code,I only uploaded some of the code to be modified, and did not upload the entire project directory structure.I have changed some code in model.py, for example : lstm_cell = tf.contrib.rnn.BasicLSTMCell(num_units=self.H),and so all 。you can try it