it's probably addressed before, but when I ran ptb_word_lm.py, it gives this error inside reader.py, is it something related to the setup?
with tf.name_scope(name, "PTBProducer", [raw_data, batch_size, num_steps]):
TypeError: name_scope() takes exactly 1 argument (3 given)
I have a different issue with v0.12.1
Not sure why models folder was moved from tensorflow repository to this repository. It is likely that developers will see version mismatch issues more and more as new versions are released. If models folder was kept in tensorflow repository, we can fix issues in the branch for each release.
$ python ptb_word_lm.py --data_path=/home/kagnmo/ml/simple-examples/data/ --model small
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
Traceback (most recent call last):
File "ptb_word_lm.py", line 371, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "ptb_word_lm.py", line 331, in main
train_input = PTBInput(config=config, data=train_data, name="TrainInput")
File "ptb_word_lm.py", line 94, in __init__
data, batch_size, num_steps, name=name)
File "/home/kagnmo/ml/models/tutorials/rnn/ptb/reader.py", line 117, in ptb_producer
[batch_size, (i + 1) * num_steps])
TypeError: strided_slice() takes at least 4 arguments (3 given)
With the latest version on the master branch of tensorflow, it works well.
@cognitronz is this fixed for you on the latest master version too?
i had to use this patch to make it work
https://github.com/tensorflow/models/pull/824/commits/a6082b5463840b0840dcf545366dca85966c5ae1
Marking contributions welcome while awaiting the PR.
Installation from source code is a little tedious. Can this change be updated to latest binary version ( whl ) ?
The scalar_summary is deprecated and should be replaced by summary.scalar in ptb_word_lm. After making the change, the script works with the nightly build.
I had the same issue with tensorflow-0.9.0 version. Reinstalling the tensorflow-1.0.0 works for me.
Uninstall:
sudo pip uninstall protobuf
sudo pip uninstall tensorflow
Install:
conda install -c conda-forge tensorflow=1.0.0
Where I can download an Apk for Android 5.1 ZTE !
@Kangmo I have the same issue, and update tensorflow with the latest vision 1.0.1. But it dose't work. Can you tell me the vision?
what's more, when the vision was 1.0.0, another issues generated:
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "ptb_word_lm.py", line 336, in main
m = PTBModel(is_training=True, config=config, input_=train_input)
File "ptb_word_lm.py", line 120, in __init__
[attn_cell() for _ in range(config.num_layers)], state_is_tuple=True)
File "ptb_word_lm.py", line 113, in lstm_cell
size, forget_bias=0.0, state_is_tuple=True, reuse=tf.get_variable_scope().reuse)
TypeError: __init__() got an unexpected keyword argument 'reuse'
By the time I wrote the comment, I could fix the issue by building
tensorflow from the master branch, and getting models from the master
branch of the models repository.
2017๋ 3์ 18์ผ ํ ์์ผ, xiaoyun4notifications@github.com๋์ด ์์ฑํ ๋ฉ์์ง:
@Kangmo https://github.com/Kangmo I have the same issue, and update
tensorflow with the latest vision 1.0.1. But it dose't work. Can you tell
me the vision?โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/models/issues/856#issuecomment-287510246,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfJP-8GaQIv4NHll65c0a2_DPt53RZ6ks5rm0FDgaJpZM4LcVV5
.
I experienced the same issue with tensorflow 0.9.0, but after building from master, I was able to successfully run the rnn tutorial.
How to use the trained model for text prediction?
How to user input and it show predicted words side by side ?
https://github.com/tensorflow/models/tree/master/tutorials/rnn/ptb
Automatically closing due to lack of recent activity. Since this issue is old at this point, please reopen the issue if it still occurs when tried with the latest version of Tensorflow. Thank you.
Most helpful comment
@Kangmo I have the same issue, and update tensorflow with the latest vision 1.0.1. But it dose't work. Can you tell me the vision?
what's more, when the vision was 1.0.0, another issues generated:
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "ptb_word_lm.py", line 336, in main
m = PTBModel(is_training=True, config=config, input_=train_input)
File "ptb_word_lm.py", line 120, in __init__
[attn_cell() for _ in range(config.num_layers)], state_is_tuple=True)
File "ptb_word_lm.py", line 113, in lstm_cell
size, forget_bias=0.0, state_is_tuple=True, reuse=tf.get_variable_scope().reuse)
TypeError: __init__() got an unexpected keyword argument 'reuse'