tf.py_func errors in freeze_graph
来源:互联网 发布:詹姆斯退役数据预测 编辑:程序博客网 时间:2024/06/13 08:16
tf.py_func
in my networks, and it works fine in training and test mode. Then I runbazel-bin/tensorflow/python/tools/freeze_graph
to freeze the graph and generate xxx.pb file.I try to restore the xxx.pb and run the model again, error happens.
2017-08-11 21:43:15.990085: W tensorflow/core/framework/op_kernel.cc:1158] Unknown: exceptions.KeyError: 'pyfunc_0'
Traceback (most recent call last):
File "/home/huang/PycharmProjects/tf-elec-h/tools/elec_det_test_savepb.py", line 259, in <module>
demo_pb(sess, im_path,output_cls_score,output_cls_prob,output_bbox_pred,output_rois,input_x,input_x_info)
File "/home/huang/PycharmProjects/tf-elec-h/tools/elec_det_test_savepb.py", line 135, in demo_pb
scores, boxes = im_detect_pb(sess, im, output_cls_score, output_cls_prob, output_bbox_pred, output_rois,input_x,input_x_info)
File "/home/huang/PycharmProjects/tf-elec-h/tools/../lib/model/test.py", line 133, in im_detect_pb
feed_dict=feed_dict)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 789, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.UnknownError: exceptions.KeyError: 'pyfunc_0'
[[Node: vgg_16/ANCHOR_default/generate_anchors = PyFunc[Tin=[DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT], Tout=[DT_FLOAT, DT_INT32], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/cpu:0"](vgg_16/ANCHOR_default/ToInt32, vgg_16/ANCHOR_default/ToInt32_1, vgg_16/ANCHOR_default/generate_anchors/input_2, vgg_16/ANCHOR_default/generate_anchors/input_3, vgg_16/ANCHOR_default/generate_anchors/input_4)]]
Caused by op u'vgg_16/ANCHOR_default/generate_anchors', defined at:
File "/home/huang/PycharmProjects/tf-elec-h/tools/elec_det_test_savepb.py", line 225, in <module>
_ = tf.import_graph_def(output_graph_def, name="")
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 311, in import_graph_def
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1269, in __init__
self._traceback = _extract_stack()
UnknownError (see above for traceback): exceptions.KeyError: 'pyfunc_0'
[[Node: vgg_16/ANCHOR_default/generate_anchors = PyFunc[Tin=[DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT], Tout=[DT_FLOAT, DT_INT32], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/cpu:0"](vgg_16/ANCHOR_default/ToInt32, vgg_16/ANCHOR_default/ToInt32_1, vgg_16/ANCHOR_default/generate_anchors/input_2, vgg_16/ANCHOR_default/generate_anchors/input_3, vgg_16/ANCHOR_default/generate_anchors/input_4)]]
Process finished with exit code 1
I found the tf.py_func
is not in the graph. How can I define and use thetf.py_func
in freezed graph?
- tf.py_func errors in freeze_graph
- Common errors in django
- errors in Freetype2
- custom errors in webconfig
- Errors in Workspace
- Tensorflow Serving不支持py_func
- Debugging errors in Load Test
- Common errors in SQL server
- Decode segfault errors in dmesg
- Handling SQL Server Errors in Nested Procedures
- How to solve building errors in XPCOM?
- Troubleshooting HTTP 401 errors in IIS
- Troubleshooting ORA-1652 Errors in RAC
- Common Errors in Setting Java Heap Size
- Commom Errors of Pointer in C++
- template class build errors in android
- [Android] errors occur in adb installation
- myeclipse 设置 errors in workspace 问题
- 8.11 模拟
- 【2017/8/11】Linux7 简单安装nginx
- HDU 5212 Code(容斥 或 莫比乌斯反演)
- git最常用!最实用!最基本的命令解析!绝对够用!
- 希尔排序(shell sort)
- tf.py_func errors in freeze_graph
- SPOJ 10628. Count on a tree (树上第k大,LCA+主席树)
- 利用Rcpp和RcppArmadillo创建R包
- 将高德坐标拾取工具放入Element UI 对话框
- MySQL 5.7搭建备库 开启gtid 使用mysqldump
- POJ 2104 -- K-th Number (分桶法和平方分割)
- offsetTop-clientTop-scrollTop-各属性介绍
- Advice for New Graduate Students
- bat 2018自然语言处理校园招聘的要求