![](/img/trans.png)
[英]AttributeError: 'Functional' object has no attribute 'predict_classes''
[英]AttributeError: 'Functional' object has no attribute 'predict_classes'
in google colaboratory using python, I am trying to load model to classify I am trying to load keras model using python to classify image, I am getting above error
predict_classes
僅適用於Sequential
class。
使用 Model class,您可以使用predict
方法,該方法將為您提供概率向量,然后獲得該向量的 argmax(使用argmax
np.argmax(y_pred1,axis=1)
)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.