I am not able to import resnet from keras.applications module

后端 未结 5 1759
滥情空心
滥情空心 2020-12-11 16:12

I\'m unable to import this module

import keras.applications.resnet

ModuleNotFoundError
in () ----> 1 import keras.a

5条回答
  •  北海茫月
    2020-12-11 17:04

    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.

    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
    

    Or if you just want to use ResNet50

    from keras.applications.resnet50 import ResNet50
    

    Alternatively, you can always build from source as mentioned here.

提交回复
热议问题