Friday, May 14, 2021

 AttributeError: 'Model' object has no attribute 'predict_classes'


Models in keras, both Sequential and Functional, provide following predictions
functions: 
  • predict()
  • predict_on_batches()
  • predict_step()
Apart from this, Sequential model provides two addtional methods: 
  • predict_classes()
  • predict_proba()
These functions directly predict the resultant class or class probability, 
without needing any conversion like numpy.argmax()
However, predict_classes() and predict_proba() are not supported by 
functional model and you will get following error if you try to implement it on
functional model: 
AttributeError: 'Model' object has no attribute 'predict_classes'

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...