yu4u / age-gender-estimation

Keras implementation of a CNN network for age and gender estimation
MIT License
1.46k stars 502 forks source link

cannot import name 'EfficientNetB0' #135

Open HOMGH opened 3 years ago

HOMGH commented 3 years ago

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 commented 3 years ago

Please use tensorflow>=2.3.0

HOMGH commented 3 years ago

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 commented 3 years ago

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).