Coder Social home page Coder Social logo

Comments (7)

GKalliatakis avatar GKalliatakis commented on May 29, 2024

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.

fmaglia avatar fmaglia commented on May 29, 2024

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.

GKalliatakis avatar GKalliatakis commented on May 29, 2024

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 is False (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.

fmaglia avatar fmaglia commented on May 29, 2024

import keras
Using TensorFlow backend.
print(keras.version)
2.1.1

I'm using the latest version!

from keras-vgg16-places365.

GKalliatakis avatar GKalliatakis commented on May 29, 2024

Have a look at the following:

from keras-vgg16-places365.

GKalliatakis avatar GKalliatakis commented on May 29, 2024

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.

fmaglia avatar fmaglia commented on May 29, 2024

Thanks.
Now it works!

from keras-vgg16-places365.

Related Issues (15)

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.