Skip to content

Error loading pretrained model in keras 3.9.2 #10

Description

@markveillette

When loading the pretrained model from huggingface using keras 3.9.2 creates an error.

# Load pretrained model
cnn = keras.models.load_model(model_file,compile=False

generates

TypeError: <class 'keras.src.models.functional.Functional'> could not be deserialized properly. Please ensure that components that are Python object instances (layers, models, etc.) returned by get_config()are explicitly deserialized in the model'sfrom_config() method.

Appears to have trouble loading the custom layer CoordConv2D

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions