keras icon indicating copy to clipboard operation
keras copied to clipboard

having error in executing object detection module

Open gguy145 opened this issue 1 year ago • 1 comments

C:\Smart-Traffic-Management-Using-Deep-Learning-master\cnn model>python trained_Model.py Loaded model from disk Traceback (most recent call last): File "C:\Smart-Traffic-Management-Using-Deep-Learning-master\cnn model\trained_Model.py", line 36, in result_x = loaded_model.predict_classes(image) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Sequential' object has no attribute 'predict_classes'. Did you mean: 'predict_step'?

gguy145 avatar Jun 20 '24 13:06 gguy145

Hi @gguy145-

Can you try to predict class using loaded_model.predict(image) instead of loaded_model.predict_classes(image) ?

mehtamansi29 avatar Jun 21 '24 08:06 mehtamansi29

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

github-actions[bot] avatar Jul 20 '24 01:07 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Jul 20 '24 01:07 google-ml-butler[bot]