Comments (7)
Code has now been updated and is fully keras-applications-compatible, which means the models can be utilised like any default keras models (taken from keras.applications).
Please try again with the updated code and comment below.
from keras-vgg16-places365.
Thanks!
I tried the 2 scripts and now I have another problem (both whit VGG16_Places365 and with VGG16_Hubryd_1365):
File "Dottorato/vgg16_hybrid_places_1365.py", line 101, in VGG16_Hubrid_1365
include_top=False)
TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'.
Finally is there a possibility to change the input shape of a network for every image?
Or can I release the model from the GPU memory for at the next iteration regenerating the same network model with a different input shape?
from keras-vgg16-places365.
Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps
Regarding input shape please refer to the official documentation :
input_shape: optional shape tuple, only to be specified if
include_top
isFalse
(otherwise the input shape has to be(224, 224, 3)
(with'channels_last'
data format) or(3, 224, 224)
(with'channels_first'
data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 48. E.g.(200, 200, 3)
would be one valid value.
from keras-vgg16-places365.
import keras
Using TensorFlow backend.
print(keras.version)
2.1.1
I'm using the latest version!
from keras-vgg16-places365.
Have a look at the following:
- https://yohanes.gultom.me/keras-vgg16-with-different-input-shape/
- https://stackoverflow.com/questions/42187425/how-to-change-input-shape-in-sequential-model-in-keras
from keras-vgg16-places365.
Also for
TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'.
Try changing "include_top" to "require_flatten" (answer taken from rcmalli/keras-squeezenet#13).
from keras-vgg16-places365.
Thanks.
Now it works!
from keras-vgg16-places365.
Related Issues (15)
- The weights of pytorch or Caffe convert to keras HOT 2
- Unable to load keras dependencies HOT 2
- How to extract features of 4096-d(or features from some other layers) with this model? HOT 1
- places_utils.py and function preprocess_input HOT 1
- How to have similar predictions as Places365 Demo HOT 2
- Fine Tuning the model HOT 1
- Couldn't manage to import the pre-trained model HOT 1
- OOM when allocating tensor with shape[25088,4096] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator cpu [Op:Add] name: fc1_233/random_uniform/
- Is preprocess_input() used for image-mean subtraction? HOT 1
- ModuleNotFoundError: No module named 'keras.api'
- Identical & low confidence predictions HOT 20
- How to train a model using my own dataset? HOT 1
- Web demo provides different labels HOT 1
- vgg16_hybrid_places_1365a.py predicts only ImageNet classes HOT 1
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-vgg16-places365.