win10 on cpu encounter KeyError: b'TEST' error
See original GitHub issue@eragonruan My enviroment is win10+cpu+tensorflow1.3. I have spend lot of time for this; I’m confused about this. Please help me on your spare time. Thanks!
Here is the error: `2018-07-26 11:11:58.723047: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\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. 2018-07-26 11:11:58.728604: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\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. Tensor(“Placeholder:0”, shape=(?, ?, ?, 3), dtype=float32) Tensor(“conv5_3/conv5_3:0”, shape=(?, ?, ?, 512), dtype=float32) Tensor(“rpn_conv/3x3/rpn_conv/3x3:0”, shape=(?, ?, ?, 512), dtype=float32) Tensor(“lstm_o/Reshape_2:0”, shape=(?, ?, ?, 512), dtype=float32) Tensor(“lstm_o/Reshape_2:0”, shape=(?, ?, ?, 512), dtype=float32) Tensor(“rpn_cls_score/Reshape_1:0”, shape=(?, ?, ?, 20), dtype=float32) Tensor(“rpn_cls_prob:0”, shape=(?, ?, ?, ?), dtype=float32) Tensor(“Reshape_2:0”, shape=(?, ?, ?, 20), dtype=float32) Tensor(“rpn_bbox_pred/Reshape_1:0”, shape=(?, ?, ?, 40), dtype=float32) Tensor(“Placeholder_1:0”, shape=(?, 3), dtype=float32) Loading network VGGnet_test… Restoring from checkpoints/VGGnet_fast_rcnn_iter_50000.ckpt… done 2018-07-26 11:12:09.006369: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Unknown: KeyError: b’TEST’ Traceback (most recent call last): File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\client\session.py”, line 1327, in _do_call return fn(*args) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\client\session.py”, line 1306, in _run_fn status, run_metadata) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\contextlib.py”, line 88, in exit next(self.gen) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\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.UnknownError: KeyError: b’TEST’ [[Node: rois/PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, DT_INT32, DT_INT32], Tout=[DT_FLOAT, DT_FLOAT], token=“pyfunc_0”, _device=“/job:localhost/replica:0/task:0/cpu:0”](Reshape_2, rpn_bbox_pred/Reshape_1, _arg_Placeholder_1_0_1, rois/PyFunc/input_3, rois/PyFunc/input_4, rois/PyFunc/input_5)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “./ctpn/demo.py”, line 97, in <module> _, _ = test_ctpn(sess, net, im) File “D:\workspace\text-detection-ctpn-master\lib\fast_rcnn\test.py”, line 51, in test_ctpn rois = sess.run([net.get_output(‘rois’)[0]],feed_dict=feed_dict) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\client\session.py”, line 895, in run run_metadata_ptr) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\client\session.py”, line 1124, in _run feed_dict_tensor, options, run_metadata) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\client\session.py”, line 1321, in _do_run options, run_metadata) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\client\session.py”, line 1340, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.UnknownError: KeyError: b’TEST’ [[Node: rois/PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, DT_INT32, DT_INT32], Tout=[DT_FLOAT, DT_FLOAT], token=“pyfunc_0”, _device=“/job:localhost/replica:0/task:0/cpu:0”](Reshape_2, rpn_bbox_pred/Reshape_1, _arg_Placeholder_1_0_1, rois/PyFunc/input_3, rois/PyFunc/input_4, rois/PyFunc/input_5)]]
Caused by op ‘rois/PyFunc’, defined at: File “./ctpn/demo.py”, line 82, in <module> net = get_network(“VGGnet_test”) File “D:\workspace\text-detection-ctpn-master\lib\networks\factory.py”, line 8, in get_network return VGGnet_test() File “D:\workspace\text-detection-ctpn-master\lib\networks\VGGnet_test.py”, line 15, in init self.setup() File “D:\workspace\text-detection-ctpn-master\lib\networks\VGGnet_test.py”, line 56, in setup .proposal_layer(_feat_stride, anchor_scales, ‘TEST’, name=‘rois’)) File “D:\workspace\text-detection-ctpn-master\lib\networks\network.py”, line 21, in layer_decorated layer_output = op(self, layer_input, *args, **kwargs) File “D:\workspace\text-detection-ctpn-master\lib\networks\network.py”, line 215, in proposal_layer [tf.float32,tf.float32]) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\ops\script_ops.py”, line 203, in py_func input=inp, token=token, Tout=Tout, name=name) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\ops\gen_script_ops.py”, line 36, in _py_func name=name) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\framework\op_def_library.py”, line 767, in apply_op op_def=op_def) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\framework\ops.py”, line 2630, in create_op original_op=self._default_original_op, op_def=op_def) File “C:\Users\d00455280.CHINA\AppData\Local\Continuum\Anaconda3\envs\ocr\lib\site-packages\tensorflow\python\framework\ops.py”, line 1204, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
UnknownError (see above for traceback): KeyError: b’TEST’ [[Node: rois/PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, DT_INT32, DT_INT32], Tout=[DT_FLOAT, DT_FLOAT], token=“pyfunc_0”, _device=“/job:localhost/replica:0/task:0/cpu:0”](Reshape_2, rpn_bbox_pred/Reshape_1, _arg_Placeholder_1_0_1, rois/PyFunc/input_3, rois/PyFunc/input_4, rois/PyFunc/input_5)]]`
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top GitHub Comments
@liudatutu just uncomment L45, it works for me
it works for me ,and thanks .