rcmalli / keras-vggface

VGGFace implementation with Keras Framework
MIT License
928 stars 417 forks source link

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

Closed HectorAnadon closed 6 years ago

HectorAnadon commented 7 years ago

I am using keras 2.0.8. I got that error because apparently include_top is not used anymore. Instead require_flatten is used.

In order to fix it change line 84 to

require_flatten=include_top)

rcmalli commented 6 years ago

It is fixed with new release v0.4. Thank you for pointing out.

taneta commented 6 years ago

Still have this issue with keras 2.0.6

muradalqurishee commented 6 years ago

Hello Taneta, in vgg16.py model line 102, edit include_top=include_top to require_flatten=include_top. The code is below input_shape = _obtain_input_shape(input_shape, default_size=224, min_size=48, data_format=K.image_data_format(), require_flatten=include_top)

creative-h commented 5 years ago
  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