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.

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:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
sportermancommented, Dec 28, 2018

@liudatutu just uncomment L45, it works for me

0reactions
cvnlicommented, May 15, 2019

@liudatutu just uncomment L45, it works for me

it works for me ,and thanks .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Activating Windows 10, Invalid Key (Error Code: 0xC004C003)
After looking everywhere, I decided to contact Cyberpower for my missing key. They gave me my key, but after I punched it in,...
Read more >
Weird License Key error Solved - Windows 10 Forums
Weird License Key error. I bought a "refurb" HP Prodesk 600 G1 off Newegg a year ago. It came with Win 10 Home...
Read more >
How to Fix Bitlocker Keeps Asking for Recovery Key? Read This!
Follow the step-by-step guide on how to fix BitLocker keeps asking for recovery key error. To recover data from BitLocker encrypted drives, ...
Read more >
How to Fix the Machine Check Exception BSOD in Windows 10
1. Update Drivers · Press Windows Key + I to open the Settings panel, then select Update & Security > View update history....
Read more >
Quick Fix "Reboot and Select Proper Boot Device" in Windows
Receive the reboot and Select proper Boot device error when restarting Windows 10/8/7? Try these solutions below to fix this issue.
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