Weird error message when run `python model.py`.
See original GitHub issueI tried to run this project in a totally new environment. (Ubuntu 16.04 64 bit, Python 2.7)
I strictly followed the instructions. However, I always end with an error message (see below) when I run python model.py
.
Traceback (most recent call last):
File "model.py", line 258, in <module>
main()
File "model.py", line 231, in main
sess.run(model.train_op)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 789, in run
run_metadata_ptr)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: seq_lens(8218) > input.dims(1)
[[Node: passage_char_encoding/bidirectional_rnn/bw/ReverseSequence = ReverseSequence[T=DT_FLOAT, Tlen=DT_INT32, batch_dim=0, seq_dim=1, _device="/job:localhost/replica:0/task:0/cpu:0"](passage_char_encoding/Reshape, passage_char_encoding/Reshape_1)]]
Caused by op u'passage_char_encoding/bidirectional_rnn/bw/ReverseSequence', defined at:
File "model.py", line 258, in <module>
main()
File "model.py", line 209, in main
model = Model(is_training = True); print("Built model")
File "model.py", line 43, in __init__
self.encode_ids()
File "model.py", line 81, in encode_ids
is_training = self.is_training)
File "/root/nlp/R-net/layers.py", line 98, in bidirectional_GRU
dtype=tf.float32)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 396, in bidirectional_dynamic_rnn
seq_dim=time_dim, batch_dim=batch_dim)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 389, in _reverse
seq_dim=seq_dim, batch_dim=batch_dim)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 2355, in reverse_sequence
name=name)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2633, in reverse_sequence
batch_dim=batch_dim, name=name)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/root/nlp/venv/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1269, in __init__
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): seq_lens(8218) > input.dims(1)
[[Node: passage_char_encoding/bidirectional_rnn/bw/ReverseSequence = ReverseSequence[T=DT_FLOAT, Tlen=DT_INT32, batch_dim=0, seq_dim=1, _device="/job:localhost/replica:0/task:0/cpu:0"](passage_char_encoding/Reshape, passage_char_encoding/Reshape_1)]]
Any idea about this problem?
I’m using the current code without any modification.
This this the pip packages I installed. nltk==3.2.4 numpy==1.13.1 scikit-learn==0.19.0 scipy==0.19.1 spacy==1.9.0 tensorflow==1.2.0 tensorflow-tensorboard==0.1.8 tqdm==4.15.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:16
Top Results From Across the Web
Weird error message when run python model.py . #15 - GitHub
I tried to run this project in a totally new environment. (Ubuntu 16.04 64 bit, Python 2.7) I strictly followed the instructions.
Read more >I get strange error when running a python script - Stack Overflow
I tried to run the script by doing python answer_bot.py. and I get this error. Traceback (most recent call last): File "answer_bot.py", ...
Read more >Syntax Error in Python 3.10 when running on Terminal
Hey guys, I'm new to Python & I tried to run my 1st Python script (“Hello World”) on the terminal using Python 3.10....
Read more >A few weird errors - v4 - PyMC Discourse
When I'm fitting models on Jupiter notebook (through vs code on mac), no matter how many cores I use, it runs fine. But...
Read more >What to do when you get an error - Hugging Face Course
Debugging the pipeline from Transformers · The error messages in Python are known as tracebacks and are read from bottom to top. ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@minsangkim142 , I have 2 modification:
@thisum I have not figured out how the point network works! So i do not know how to fix it! I need more time to figure out the shape of every tensor!.