我试图运行的代码应该是识别不同类型的图像类别。代码是VGG16的,我有以下错误。当然,我试图安装和导入目录(keras等.),但错误仍然存在。会很感激你的帮助。谢谢。
这是被标记的代码行
vgg16 = applications.VGG16(include_top=False, weights='data3/')
这就是错误
AttributeError: module 'keras.applications' has no attribute 'VGG16'
发布于 2022-02-15 11:14:39
应该是applications.vgg16.VGG16(...)。
发布于 2022-02-19 13:02:38
我用from tensorflow.keras import applications而不是from keras import applications解决了同样的问题
https://stackoverflow.com/questions/71125285
复制相似问题