Giter VIP home page Giter VIP logo

Comments (5)

rdcolema avatar rdcolema commented on August 16, 2024

Hi @som2014, that looks like a dim ordering issue. Are you using the tensorflow backend or the theano backend? They use different image data formats, with the number of channels (3 in this case, either at the front or at the end of the weight shape.

See here: https://stackoverflow.com/questions/47990621/image-ordering-tensor-flow or Google around about tensorflow and thano dim ordering for more details.

tldr, I think you could fix your problem by either reshaping your data or using a different keras backend.

from keras-image-classification.

Asturias-sam avatar Asturias-sam commented on August 16, 2024

@rdcolema error is coming in save_bottleneck_features() my json file look like this

{
  "backend": "theano",
  "epsilon": 1e-07,
  "floatx": "float32",
  "image_dim_ordering": "tf"
}
```I had tried some workaround but nothing works any suggestion please ?

from keras-image-classification.

rdcolema avatar rdcolema commented on August 16, 2024

Try changing "image_dim_ordering" to "th" and see if that helps.

from keras-image-classification.

Asturias-sam avatar Asturias-sam commented on August 16, 2024

I had already try that workaround changed it "th" and also using this code K.set_image_dim_ordering('th') but still same error

from keras-image-classification.

rdcolema avatar rdcolema commented on August 16, 2024

Have you tried modifying the line model.add(ZeroPadding2D((1, 1), input_shape=(3, img_width, img_height))) ?

I also might try printing/logging K.image_dim_ordering() before the error to make sure the configuration is what you expect. The other part of that function that could be affecting it is the model that's being loaded from the h5py file -- if the weights use a different ordering there that might be conflicting with something.

For the record this is also really old code built off a much earlier version of keras, so there's a good chance some things have changed under the hood since then too.

from keras-image-classification.

Related Issues (7)

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.