question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Excuse me,my python version is 3.5 and tensorflow version is 1.2.1,But I had some trouble when debug it.Here is the error I encountered:

C:\Users\Administrator\AppData\Local\Programs\Python\Python35\python.exe D:/PerfectProject/NRE/train_GRU.py reading wordembedding reading training data 2017-07-26 19:16:09.465988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.465988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.466988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.466988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.466988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.466988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.466988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-07-26 19:16:09.466988: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.


Tensor(“model/Reshape_1:0”, shape=(?, 70, 230), dtype=float32)


WARNING:tensorflow:From C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\util\tf_should_use.py:170: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02. Instructions for updating: Use tf.global_variables_initializer instead. Traceback (most recent call last): File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py”, line 1139, in _do_call return fn(*args) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py”, line 1121, in _run_fn status, run_metadata) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\contextlib.py”, line 66, in exit next(self.gen) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\errors_impl.py”, line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.InvalidArgumentError: axis 0 specified more than once. [[Node: model/ReverseV2_3 = ReverseV2[T=DT_FLOAT, Tidx=DT_INT32, _device=“/job:localhost/replica:0/task:0/cpu:0”](model/Reshape_2, model/ReverseV2_3/axis)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “D:/PerfectProject/NRE/train_GRU.py”, line 164, in <module> tf.app.run() File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\app.py”, line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File “D:/PerfectProject/NRE/train_GRU.py”, line 148, in main train_step(temp_word,temp_pos1,temp_pos2,temp_y,settings.big_num) File “D:/PerfectProject/NRE/train_GRU.py”, line 103, in train_step temp, step, loss, accuracy,summary,l2_loss,final_loss= sess.run([train_op, global_step, m.total_loss, m.accuracy,merged_summary,m.l2_loss,m.final_loss], feed_dict) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py”, line 789, in run run_metadata_ptr) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py”, line 997, in _run feed_dict_string, options, run_metadata) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py”, line 1132, in _do_run target_list, options, run_metadata) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\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: axis 0 specified more than once. [[Node: model/ReverseV2_3 = ReverseV2[T=DT_FLOAT, Tidx=DT_INT32, _device=“/job:localhost/replica:0/task:0/cpu:0”](model/Reshape_2, model/ReverseV2_3/axis)]]

Caused by op ‘model/ReverseV2_3’, defined at: File “D:/PerfectProject/NRE/train_GRU.py”, line 164, in <module> tf.app.run() File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\app.py”, line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File “D:/PerfectProject/NRE/train_GRU.py”, line 49, in main m = network.GRU(is_training=True, word_embeddings = wordembedding, settings = settings) File “D:\PerfectProject\NRE\network.py”, line 111, in init [False, True, False]) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\array_ops.py”, line 2334, in reverse return gen_array_ops.reverse_v2(tensor, axis, name) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\gen_array_ops.py”, line 2699, in reverse_v2 name=name) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\op_def_library.py”, line 767, in apply_op op_def=op_def) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py”, line 2506, in create_op original_op=self._default_original_op, op_def=op_def) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py”, line 1269, in init self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): axis 0 specified more than once. [[Node: model/ReverseV2_3 = ReverseV2[T=DT_FLOAT, Tidx=DT_INT32, _device=“/job:localhost/replica:0/task:0/cpu:0”](model/Reshape_2, model/ReverseV2_3/axis)]]

Process finished with exit code 1

image

I’m looking forward your reply.Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
samithajcommented, Jul 26, 2017

read the Requirements: Python (>=2.7) TensorFlow (=r0.11) scikit-learn (>=0.18) Matplotlib (>=2.0.0) itchat (optional)

you can use below foked repo that updates the code to Python 3 and Tensorflow 1.x https://github.com/frankxu2004/TensorFlow-NRE

0reactions
mbxmxmcommented, May 8, 2018

I have got the errors: File “initial.py”, line 31, in init f = open(‘./origin_data/KBP/wiki_100d.txt’, encoding=‘utf-8’) too I removed the’/KBP’, and changed the data but still had errors: File “initial.py”, line 624, in <module> init() File “initial.py”, line 141, in init avg_vec += vec[word2id[p]] ValueError: operands could not be broadcast together with shapes (100,) (50,) (100,) I want to know what do I need to run this program. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

System Of A Down - Question! (Official HD Video) - YouTube
Official HD music video for ” Question !" by System of a DownListen to System of a Down: https://SystemOfADown.lnk.to/listenYDSubscribe to the ...
Read more >
Question Definition & Meaning - Merriam-Webster
noun ; b · a subject or aspect in dispute or open for discussion : issue ; d · the specific point at...
Read more >
Question Definition & Meaning | Dictionary.com
a problem for discussion or under discussion; a matter for investigation. a matter of some uncertainty or difficulty; problem (usually followed by of):...
Read more >
Meaning of question in English - Cambridge Dictionary
a sentence or phrase used to find out information: The police asked me questions all day. Why won't you answer my question?
Read more >
107 Synonyms & Antonyms for QUESTION - Thesaurus.com
Find 107 ways to say QUESTION, along with antonyms, related words, and example sentences at Thesaurus.com, the world's most trusted free thesaurus.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found