Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting unexpected keyword argument 'include_top' #13

Open
Heavy02011 opened this issue Aug 28, 2017 · 5 comments
Open

getting unexpected keyword argument 'include_top' #13

Heavy02011 opened this issue Aug 28, 2017 · 5 comments

Comments

@Heavy02011
Copy link

Heavy02011 commented Aug 28, 2017

After using the example I get the following error:

`/keras_squeezenet/squeezenet.py in SqueezeNet(input_tensor, input_shape, weights, classes)
56
57
---> 58 input_shape = _obtain_input_shape(input_shape,default_size=227,min_size=48,data_format=K.image_data_format(),include_top=True)
59 #input_shape = _obtain_input_shape(input_shape,default_size=227,min_size=48,data_format=K.image_data_format())
60

TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'`

Any idea what I'm overlooking? thx

@shunsuke227ono
Copy link

@Heavy02011

Are you using Keras v2.0.0?
Or you can change your keras version to 2.0.0 via doing like pip install keras==2.0.0.

Because it seems like the error depends on keras version. At keras 2.0.8, which i was using, _obtain_input_shape (from keras.applications.imagenet_utils import _obtain_input_shape) method does not expect to get include_top argument. At keras 2.0.0, the method has include_top argument. So I just changed keras version to 2.0.0 and it works now!

@ghost
Copy link

ghost commented Oct 12, 2017

I am using keras==2.0.6, and i also got this error:
"TypeError: SqueezeNet() got an unexpected keyword argument 'include_top' "
and this error still exists while i changed keras==2.0.0

@Rafi-afridi
Copy link

change "include_top" to "require_flatten". Issue will resolved

@a6225301
Copy link

a6225301 commented Dec 7, 2017

i made it success by degrade the keras version to 2.0.0 , and then change "include_top" to "require_flatten".

@creative-h
Copy link

  1. clone this git repo: "https://github.com/keras-team/keras-applications"
  2. then import it " from keras import applications"
  3. Now import vgg16 "from keras.applications.vgg16 import VGG16"

this will work for keras 2.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants