You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
您好,我在预测时运行predict.py提示出错,能指导一下是什么原因吗,谢谢
Traceback (most recent call last):
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1139, in _do_call
return fn(*args)
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1117, in _run_fn
self._extend_graph()
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1166, in _extend_graph
self._session, graph_def.SerializeToString(), status)
File "D:\Anaconda\lib\contextlib.py", line 88, in exit
next(self.gen)
File "D:\Anaconda\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: Multiple OpKernel registrations match NodeDef 'decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)': 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }' and 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }'
[[Node: decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/pycharm/code/seq2seq_chatbot_new-master/seq2seq_chatbot_new-master/predict.py", line 43, in
model.saver.restore(sess, ckpt.model_checkpoint_path)
File "D:\Anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1548, in restore
{self.saver_def.filename_tensor_name: save_path})
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 789, in run
run_metadata_ptr)
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "D:\Anaconda\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: Multiple OpKernel registrations match NodeDef 'decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)': 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }' and 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }'
[[Node: decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)]]
Caused by op 'decoder/decoder/GatherTree', defined at:
File "D:/pycharm/code/seq2seq_chatbot_new-master/seq2seq_chatbot_new-master/predict.py", line 39, in
mode='decode', use_attention=True, beam_search=True, beam_size=5, max_gradient_norm=5.0)
File "D:\pycharm\code\seq2seq_chatbot_new-master\seq2seq_chatbot_new-master\model.py", line 21, in init
self.build_model()
File "D:\pycharm\code\seq2seq_chatbot_new-master\seq2seq_chatbot_new-master\model.py", line 148, in build_model
maximum_iterations=10)
File "D:\Anaconda\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\decoder.py", line 296, in dynamic_decode
final_outputs, final_state, final_sequence_lengths)
File "D:\Anaconda\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\beam_search_decoder.py", line 280, in finalize
sequence_length=sequence_lengths)
File "D:\Anaconda\lib\site-packages\tensorflow\contrib\seq2seq\ops\gen_beam_search_ops.py", line 43, in gather_tree
sequence_length=sequence_length, name=name)
File "D:\Anaconda\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
op_def=op_def)
File "D:\Anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\Anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 1269, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Multiple OpKernel registrations match NodeDef 'decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)': 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }' and 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }'
[[Node: decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)]]
The text was updated successfully, but these errors were encountered:
您好,我在预测时运行predict.py提示出错,能指导一下是什么原因吗,谢谢
Traceback (most recent call last):
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1139, in _do_call
return fn(*args)
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1117, in _run_fn
self._extend_graph()
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1166, in _extend_graph
self._session, graph_def.SerializeToString(), status)
File "D:\Anaconda\lib\contextlib.py", line 88, in exit
next(self.gen)
File "D:\Anaconda\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: Multiple OpKernel registrations match NodeDef 'decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)': 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }' and 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }'
[[Node: decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/pycharm/code/seq2seq_chatbot_new-master/seq2seq_chatbot_new-master/predict.py", line 43, in
model.saver.restore(sess, ckpt.model_checkpoint_path)
File "D:\Anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1548, in restore
{self.saver_def.filename_tensor_name: save_path})
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 789, in run
run_metadata_ptr)
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "D:\Anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "D:\Anaconda\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: Multiple OpKernel registrations match NodeDef 'decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)': 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }' and 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }'
[[Node: decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)]]
Caused by op 'decoder/decoder/GatherTree', defined at:
File "D:/pycharm/code/seq2seq_chatbot_new-master/seq2seq_chatbot_new-master/predict.py", line 39, in
mode='decode', use_attention=True, beam_search=True, beam_size=5, max_gradient_norm=5.0)
File "D:\pycharm\code\seq2seq_chatbot_new-master\seq2seq_chatbot_new-master\model.py", line 21, in init
self.build_model()
File "D:\pycharm\code\seq2seq_chatbot_new-master\seq2seq_chatbot_new-master\model.py", line 148, in build_model
maximum_iterations=10)
File "D:\Anaconda\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\decoder.py", line 296, in dynamic_decode
final_outputs, final_state, final_sequence_lengths)
File "D:\Anaconda\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\beam_search_decoder.py", line 280, in finalize
sequence_length=sequence_lengths)
File "D:\Anaconda\lib\site-packages\tensorflow\contrib\seq2seq\ops\gen_beam_search_ops.py", line 43, in gather_tree
sequence_length=sequence_length, name=name)
File "D:\Anaconda\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
op_def=op_def)
File "D:\Anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\Anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 1269, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Multiple OpKernel registrations match NodeDef 'decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)': 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }' and 'op: "GatherTree" device_type: "CPU" constraint { name: "T" allowed_values { list { type: DT_INT32 } } }'
[[Node: decoder/decoder/GatherTree = GatherTree[T=DT_INT32](decoder/decoder/TensorArrayStack_1/TensorArrayGatherV3, decoder/decoder/TensorArrayStack_2/TensorArrayGatherV3, decoder/decoder/while/Exit_16)]]
The text was updated successfully, but these errors were encountered: