Closed d0znpp closed 7 years ago
Thanks for pointing this out. This is a problem with TensorFlow 0.12. I will fix it in the next update.
If you want to run some experiments before the update, you can try using it with TensorFlow 0.10 (for example, through virtualenv).
Hey there, any word on how this bug can be fixed? Project looks great!
Thanks :)
I am working on a major update to use TensorFlow 1.0 (fixing state_is_tuple problem, using dynamic_rnn, etc). This repo will be updated in one or two weeks.
And thanks for the pull request :)
期待修复后的文件。
Sorry for the wait. Now the code works with TensorFlow 1.0.
$ python train.py
01:15:03 INFO:Reading data from: data/tiny_shakespeare.txt 01:15:03 INFO:Number of characters: 1115394 01:15:03 INFO:Creating train, valid, test split 01:15:03 INFO:Creating vocabulary 01:15:03 INFO:Vocabulary is saved in output/vocab.json 01:15:03 INFO:Vocab size: 65 01:15:03 INFO:Creating graph WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x7f9f8d4e4e10>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True. 01:15:03 WARNING:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x7f9f8d4e4e10>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True. WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x7f9f8d4e4250>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True. 01:15:03 WARNING:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x7f9f8d4e4250>: 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 373, in
main()
File "train.py", line 241, in main
train_model = CharRNN(is_training=True, use_batch=True, **params)
File "/root/tensorflow-char-rnn/char_rnn_model.py", line 90, in init
'initial_state')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1324, in placeholder
shape = tensor_shape.as_shape(shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 815, in as_shape
return TensorShape(shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 451, in init
self._dims = [as_dimension(d) for d in dims_iter]
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 374, in as_dimension
return Dimension(value)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 33, in init
self._value = int(value)
TypeError: int() argument must be a string or a number, not 'tuple'