-2

When i try to run the efficientNetv2 model I got this erreur Error-message

AttributeError: module'tensorflow.keras.applications ' has no attribute 'efficientnet_v2'

Tensorflow version : tensorflow-gpu:2.6

kaliiiiiiiii
  • 925
  • 1
  • 2
  • 21
Cy Rine
  • 1
  • 4

2 Answers2

1

The import is incorrect, you need to update it, it might have worked in older Keras versions,but the internal per-network modules inside keras.applications are not exposed anymore, so your correct import would be:

keras.applications.EfficientNetV2S

Or if you use tf.keras:

tf.keras.applications.EfficientNetV2S

For future reference, always check the documentation, for EfficientNetV2S the link is here.

Dr. Snoopy
  • 55,122
  • 7
  • 121
  • 140
0

install efficientnet in you env !pip install keras-efficientnet

then you can import model as

import efficientnet.tfkeras as efc

done... you can use prefix 'efc' for B0-B7