Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
952 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...