Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed> #352

Open
wangyl218 opened this issue Jan 17, 2020 · 0 comments

Comments

@wangyl218
Copy link

I trained the model in python3 on tf_1.13,I need to test the model in python2 on tf_1.4 ,when I run the /lib/fast_rcnn/test.py, then it happens the error:
Traceback (most recent call last):
File "demo.py", line 24, in
result, image_framed = ocr.model(image)
File "/data/wangyl/CTPN_FX_py2/ocr.py", line 84, in model
text_recs, img_framed,img1 = text_detect(img)
File "/data/wangyl/CTPN_FX_py2/ctpn/text_detect.py", line 101, in text_detect
scores, boxes, img1, scale = ctpn(img)
File "/data/wangyl/CTPN_FX_py2/ctpn/text_detect.py", line 59, in ctpn
scores, boxes, row = test_ctpn(sess, net, img1)
File "/data/wangyl/CTPN_FX_py2/ctpn/lib/fast_rcnn/test.py", line 72, in test_ctpn
rois = sess.run([net.get_output('rois')],feed_dict=feed_dict)
File "/home/tkocr/.conda/envs/py27_wyl/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/home/tkocr/.conda/envs/py27_wyl/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/home/tkocr/.conda/envs/py27_wyl/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/home/tkocr/.conda/envs/py27_wyl/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed>

I print the net.get_output('rois') and feed_dict both in py2 and p3, they are the same both in data and shape, but it runs OK in py3, occurs error in py2, Why, anyone help me please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant