我无法从keras.applications模块导入resnet [英] I am not able to import resnet from keras.applications module
问题描述
我无法导入该模块
import keras.applications.resnet
ModuleNotFoundError
在 () ----> 1导入keras.applications.resnet
ModuleNotFoundError
in () ----> 1 import keras.applications.resnet
ModuleNotFoundError: No module named 'keras.applications.resnet'
keras resnet 链接
keras resnet link
推荐答案
Keras团队尚未在当前模块中包含resnet,resnet_v2和resnext,它们将从Keras 2.2.5中添加,如
Keras team hasn't included resnet, resnet_v2 and resnext in the current module, they will be added from Keras 2.2.5, as mentioned here.
要解决此问题,您可以直接使用keras_applications模块导入所有ResNet,ResNetV2和ResNeXt模型,如下所示
For a workaround, you can use keras_applications module directly to import all ResNet, ResNetV2 and ResNeXt models, as given below
from keras_applications.resnet import ResNet50
或者如果您只想使用ResNet50
Or if you just want to use ResNet50
from keras.applications.resnet50 import ResNet50
或者,您总是可以如此处所述从源代码构建.
Alternatively, you can always build from source as mentioned here.
这篇关于我无法从keras.applications模块导入resnet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!