Skip to content

No module named 'efficientnet.layers' #8

Description

@Samjith888

Got this error while loading a trained model

from efficientnet.layers import Swish, DropConnect
ModuleNotFoundError: No module named 'efficientnet.layers'

script used :

from efficientnet.layers import Swish, DropConnect
from efficientnet.model import ConvKernalInitializer
from tensorflow.keras.utils import get_custom_objects

get_custom_objects().update({
    'ConvKernalInitializer': ConvKernalInitializer,
    'Swish': Swish,
    'DropConnect':DropConnect
})
from tensorflow.keras.models import load_model
model = load_model("./models/cats_and_dogs_small.h5")

Installed efficientnet using following command

pip install -U efficientnet

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions