Giter Club home page Giter Club logo

Comments (3)

fchollet avatar fchollet commented on June 27, 2024

It looks like a config deserialization issue. If you have the model's code, you can:

  1. Load the old model with the old Keras version
  2. Save its weights via save_weights() to h5 format
  3. Update to the latest Keras version
  4. Use the code to create an instance of the model
  5. Load the weights file

from keras.

ragesh2000 avatar ragesh2000 commented on June 27, 2024

But the problem is I am not able to load the model in any version. It was used keras-resnet==0.1.0 at the time of training and saving the model. But this version is not even available now. The oldest version currently available is keras-resnet==0.3.1. I am getting the same error in this version also. @fchollet

from keras.

fchollet avatar fchollet commented on June 27, 2024

Looking at the config in the error message, I have a vague idea what might be going on. This is not the config of a Keras BatchNormalization layer. For instance, the freeze argument is not a Keras argument.

So I think the model was built using custom layer from some package. But the name of these layers collides with built-in Keras layers. Hence the error.

You need to provide custom_objects=... when loading the model. Specify the custom classes by hand.

from keras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.