Open yifeili2019 opened 4 years ago
line 189: non_zero_idxs = np.nonzero(image_pred[:, 4])
got similar:
defined>, <undefined>
2020-04-26 20:07:38.743339: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
Traceback (most recent call last):
File "./demo.py", line 105, in <module>
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "./demo.py", line 96, in main
iou_threshold=FLAGS.iou_threshold)
File "/home/efmb/Documents/udacity/nd131/Converting_yolov3/tensorflow-yolo-v3/utils.py", line 191, in non_max_suppression
image_pred = image_pred.reshape(-1, shape[-1])
ValueError: cannot reshape array of size 920 into shape (85)
any help?
I met the same issue when trying to run demo.py, here's the solution works for me others discussed before, hope it helps!
@cocoyen1995 yeah, it work out!
Hi,when I tried your code, I met this mistake. Can someone help me Traceback (most recent call last): File "demo.py", line 105, in
tf.app.run()
File "/home/dell/.local/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/dell/.local/lib/python3.5/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/home/dell/.local/lib/python3.5/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "demo.py", line 96, in main
iou_threshold=FLAGS.iou_threshold)
File "/home/dell/Desktop/Yolov3/tensorflow-yolo-v3-master/utils.py", line 191, in non_max_suppression
image_pred = image_pred.reshape(-1, shape[-1])
ValueError: cannot reshape array of size 501 into shape (85)