简体   繁体   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 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 is only available for the Sequential class. predict_classes仅适用于Sequential class。

With the Model class, you can use the predict method which will give you a vector of probabilities and then get the argmax of this vector (with np.argmax(y_pred1,axis=1) ).使用 Model class,您可以使用predict方法,该方法将为您提供概率向量,然后获得该向量的 argmax(使用argmax np.argmax(y_pred1,axis=1) )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AttributeError:“功能”对象没有属性“predict_classes” - AttributeError: 'Functional' object has no attribute 'predict_classes'' pred = model.predict_classes([prepare(file_path)]) AttributeError: 'Functional' object 没有属性 'predict_classes' - pred = model.predict_classes([prepare(file_path)]) AttributeError: 'Functional' object has no attribute 'predict_classes' Keras AttributeError: 'Sequential' object 没有属性 'predict_classes' - Keras AttributeError: 'Sequential' object has no attribute 'predict_classes' AttributeError: 'History' 对象没有属性 'predict_classes' - AttributeError: 'History' object has no attribute 'predict_classes' AttributeError: 'Sequential' object 没有属性 'predict_classes' - AttributeError: 'Sequential' object has no attribute 'predict_classes' 即使使用顺序 model,我也会收到“AttributeError: 'Model' object has no attribute 'predict_classes'” - Even when using Sequential model, I am getting “AttributeError: 'Model' object has no attribute 'predict_classes' ” 编码时出现错误:“AttributeError: 'Sequential' object has no attribute 'predict_classes'”。 这里错了 - I get the error: " AttributeError: 'Sequential' object has no attribute 'predict_classes' " while coding. Its wrong here AttributeError: 'Functional' 对象没有属性 'predict_proba' - AttributeError: 'Functional' object has no attribute 'predict_proba' 实用的API Keras预测方案的替代解决方案 - Functional API Keras alternate solution for predict_classes() AttributeError: 'Functional' object has no attribute 'predict_segmentation' 导入 TensorFlow model797FEE7BB663AEFFCE4 - AttributeError: 'Functional' object has no attribute 'predict_segmentation' When importing TensorFlow model Keras
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM