keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.26k stars 19.38k forks source link

having error in executing object detection module #19888

Open gguy145 opened 2 weeks ago

gguy145 commented 2 weeks ago

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'?

mehtamansi29 commented 2 weeks ago

Hi @gguy145-

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