Comments (5)
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.
@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.
Try changing "image_dim_ordering" to "th" and see if that helps.
from keras-image-classification.
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.
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)
- Environment Specifications to run this code HOT 4
- TypeError: Number of dimensions lower than expected HOT 1
- Layer weight shape (3, 3, 200, 64) not compatible with provided weight shape (64, 3, 3, 3) HOT 9
- How do you get the 'bottleneck_weights.h5' file? HOT 1
- Error HOT 1
- Layer weight shape not compatible with provided weight shape
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-image-classification.