Keras中的ResNet50v2
我想在Keras中加载预先训练过的ResNet50v2模型。我试过了Keras中的ResNet50v2,keras,resnet,pre-trained-model,Keras,Resnet,Pre Trained Model,我想在Keras中加载预先训练过的ResNet50v2模型。我试过了 keras.applications.resnet_v2.ResNet50V2() 这是一个错误 Traceback (most recent call last): File "<input>", line 1, in <module> AttributeError: module 'keras.applications' has no attribute 'resnet_v2' 这就产生了错
keras.applications.resnet_v2.ResNet50V2()
这是一个错误
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: module 'keras.applications' has no attribute 'resnet_v2'
这就产生了错误
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/nagabhushan/.local/lib/python3.6/site-packages/keras_applications/resnet_common.py", line 495, in ResNet50V2
**kwargs)
File "/home/nagabhushan/.local/lib/python3.6/site-packages/keras_applications/resnet_common.py", line 348, in ResNet
data_format=backend.image_data_format(),
AttributeError: 'NoneType' object has no attribute 'image_data_format'
导入keras
keras.applications.resnet_v2.ResNet50V2()
工作正常!我使用的是tensorflow gpu
和keras gpu
。仅使用tensorflow
和keras
进行了尝试。成功了。
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/nagabhushan/.local/lib/python3.6/site-packages/keras_applications/resnet_common.py", line 495, in ResNet50V2
**kwargs)
File "/home/nagabhushan/.local/lib/python3.6/site-packages/keras_applications/resnet_common.py", line 348, in ResNet
data_format=backend.image_data_format(),
AttributeError: 'NoneType' object has no attribute 'image_data_format'
from keras.applications.resnet50 import ResNet50