AttributeError: 'Model' object has no attribute 'predict_classes'
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to predict on the validation data with pre-trained and fine-tuned DL models. The code follows the example available in the Keras blog on "building image classification models using very little data". Here is the code: import numpy as np from keras.preprocessing.image import ImageDataGenerator import matplotlib.pyplot as plt from keras.models import Sequential from keras.models import Model from keras.layers import Flatten, Dense from sklearn.metrics import classification_report,confusion_matrix from sklearn.metrics import roc_auc