我已经成功地建立了几个基于mobileNet的模型。我注意到在Keras2.2.0中添加了MobileNet_V2,但是我无法使它工作:
from keras.applications.mobilenet_v2 import mobilenet_v2
base_model = mobilenet_v2.MobileNetV2(weights='imagenet', include_top=False)我得到了以下错误:AttributeError: 'NoneType' object has no attribute 'image_data_format'在这一行中来自mobilenet_v2.py data_format=backend.image_data_format()
在我看来backend有一个定义问题..。我正在使用Tensorflow后端,也许它不适用于这个?
发布于 2018-10-09 12:49:51
问题来自进口。这样做的正确方法是做以下工作:
from keras.applications import MobileNetV2
m = MobileNetV2(weights='imagenet', include_top=False)https://stackoverflow.com/questions/52717181
复制相似问题