Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
950 views
in Technique[技术] by (71.8m points)

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

I'm unable to import this module

import keras.applications.resnet

ModuleNotFoundError
in () ----> 1 import keras.applications.resnet

ModuleNotFoundError: No module named 'keras.applications.resnet'


keras resnet link

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...