簡體   English   中英

AttributeError:“功能”object 沒有屬性“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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM