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

 using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...