EfficientNet does not seem to present in keras.applications

Viewed 6115

I am trying to use the EfficientNet model from tf.keras but for some reason this does not seem to work.

import tensorflow.keras.applications as apps
help(apps)

does not list EfficientNetB0 as a model. Similarly,

import tensorflow.keras.applications.EfficientNetB0

prints

ModuleNotFoundError: No module named 'tensorflow.keras.applications.EfficientNetB0'

My current Keras.applications is 1.0.8 which seems to be the latest version. My Keras version is 2.2.5 and my tensorflow 1.15. Also, the same behavior is apparent for stand alone keras version.

Shouldn't this be resolved by the keras.application version only? Does it has to do with the tensorflow version (meaning maybe only tf 2 can use them?). And finally, is there a work around this issue that I can use?

2 Answers

So far, the modules EfficientNetB0 through EfficientNetB7 are only available in the nightly build of tensorflow keras which is unstable. you can install this build by pip install tf-nightly

The EfficientNet models are available in TensorFlow version 2.3.0 and later.

Related