Open qiumei1101 opened 4 years ago
Now the code is only for inference, steps argument is needed when training in the case that data tensors is repeated.
I am having the same error for inference. Do you know where the problem might be?
Traceback (most recent call last): File "detect.py", line 42, in <module> pred_bbox = model.predict(img_tensor) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 908, in predict use_multiprocessing=use_multiprocessing,) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training_arrays.py", line 716, in predict x, check_steps=True, steps_name='steps', steps=steps) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 2414, in _standardize_user_data training_utils.check_steps_argument(x, steps, steps_name) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training_utils.py", line 1199, in check_steps_argument input_type=input_type_str, steps_name=steps_name)) ValueError: When using data tensors as input to a model, you should specify the
stepsargument.
I am having the same error for inference. Do you know where the problem might be?
Traceback (most recent call last): File "detect.py", line 42, in <module> pred_bbox = model.predict(img_tensor) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 908, in predict use_multiprocessing=use_multiprocessing,) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training_arrays.py", line 716, in predict x, check_steps=True, steps_name='steps', steps=steps) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 2414, in _standardize_user_data training_utils.check_steps_argument(x, steps, steps_name) File "C:\Users\patricia.sakugawa\AppData\Local\Continuum\anaconda3\envs\cellere_img\lib\site-packages\tensorflow_core\python\keras\engine\training_utils.py", line 1199, in check_steps_argument input_type=input_type_str, steps_name=steps_name)) ValueError: When using data tensors as input to a model, you should specify the
stepsargument.
You can try print "img_tensor" to see if it is empty, if so, maybe you didn't specify input arguments:
python detect.py --image ./kite.jpg
I am testing with the kite.jpg image
The print(img_tensor) gives:
Tensor("ExpandDims:0", shape=(1, 608, 608, 3), dtype=float32)
I am testing with the kite.jpg image
The print(img_tensor) gives:
Tensor("ExpandDims:0", shape=(1, 608, 608, 3), dtype=float32)
Same error?That's strange
Yes, same error
If you can not figure out why, maybe use numpy array as input instead of tensor,just rewrite the code
Ok, I will give it a try. Thanks!
When using data tensors as input to a model, you should specify the
steps
argument.?