Faster-RCNN_TF
Faster-RCNN_TF copied to clipboard
op_kernel.cc:1158 NameError: name 'xrange' is not defined
Hi Guys,
When i am loading the VGGnet_fast_rcnn_iter_70000.ckpt model i get the below error.
Need some assistance on the below error
Loaded network ./VGGnet_fast_rcnn_iter_70000.ckpt 2017-07-12 05:31:58.415534: W tensorflow/core/framework/op_kernel.cc:1158] Unkno wn: NameError: name 'xrange' is not defined Traceback (most recent call last): File "/home/naveen/srcnn/lib/python3.5/site-packages/tensorflow/python/client/ session.py", line 1139, in _do_call return fn(*args) File "/home/naveen/srcnn/lib/python3.5/site-packages/tensorflow/python/client/ session.py", line 1121, in _run_fn status, run_metadata) File "/anaconda/envs/py35/lib/python3.5/contextlib.py", line 66, in exit next(self.gen) File "/home/naveen/srcnn/lib/python3.5/site-packages/tensorflow/python/framewo rk/errors_impl.py", line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.UnknownError: NameError: name 'xrange' i s not defined [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, D T_INT32, DT_INT32], Tout=[DT_FLOAT], token="pyfunc_0", _device="/job:localhost/r eplica:0/task:0/cpu:0"](rpn_cls_prob_reshape, rpn_bbox_pred/rpn_bbox_pred, arg Placeholder_1_0_1, PyFunc/input_3, PyFunc/input_4, PyFunc/input_5)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./tools/demo.py", line 128, in
Caused by op 'PyFunc', defined at:
File "./tools/demo.py", line 116, in
UnknownError (see above for traceback): NameError: name 'xrange' is not defined [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, D T_INT32, DT_INT32], Tout=[DT_FLOAT], token="pyfunc_0", _device="/job:localhost/r eplica:0/task:0/cpu:0"](rpn_cls_prob_reshape, rpn_bbox_pred/rpn_bbox_pred, arg Placeholder_1_0_1, PyFunc/input_3, PyFunc/input_4, PyFunc/input_5)]]
regards sekar
I tried finding if xrange has to be replaced as range in the python files, but had limited success. Note i am using python 3.4 not 2.7.
I have the same question and have you solved this problem? And i use python 3.6.
I have same problem, do you kown what cases this issue?
You need to change xrange to range if you are using python3.x
grep -Ril "xrange",find it and change it for "range".It is caused by the difference of python2.x and python3.x.