Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'EfficientNetB0' #135

Open
HOMGH opened this issue Feb 6, 2021 · 3 comments
Open

cannot import name 'EfficientNetB0' #135

HOMGH opened this issue Feb 6, 2021 · 3 comments

Comments

@HOMGH
Copy link

HOMGH commented Feb 6, 2021

Hi,
I'm trying to run demo.py to estimate age/gender from my own images but I'm getting : "cannot import name 'EfficientNetB0'" error from this line of the code: "from tensorflow.keras.applications import EfficientNetB0".
Tensorflow version: 1.13
Python version: 3.6

Any idea?

@yu4u
Copy link
Owner

yu4u commented Feb 6, 2021

Please use tensorflow>=2.3.0

@HOMGH
Copy link
Author

HOMGH commented Feb 6, 2021

Please use tensorflow>=2.3.0

Thank you for your reply. I wanna use your code in my own network which should be implemented in TF1.13. Is there any other way to resolve the issues?

@yu4u
Copy link
Owner

yu4u commented Feb 6, 2021

remove these lines

strategy = tf.distribute.MirroredStrategy()
with strategy.scope():

and try:

python train.py model.model_name=MobileNetV2

I have no ideas about how to use the pretrained model (EfficientNetB0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants