Instantiated VGG16/19 model with the argument 'include_top'=False gives constant output shape (1, 1, 512) Although I provided 'classes'=10 along with them.
import keras
from keras.applications import vgg16
# Use (-1, 32, 32, 3) CIFAR-10 images as input dataset, for example.
(train_x, train_y), (test_x, test_y) =\
keras.datasets.cifar10.load_data()
vgg = vgg16.VGG16(include_top=False,
weights=None,
input_shape=(32, 32, 3),
classes=10)
vgg.summary()
I Expected (None, 1, 1, 10) as an output shape, but the model gives: (None, 1, 1, 512)
If it is okay, I'd like to make a PR with some corresponding test code.
Thanks for the wonderful work by the way, will look forward to your comment. :)
Instantiated VGG16/19 model with the argument
'include_top'=False
gives constant output shape (1, 1, 512) Although I provided'classes'=10
along with them.I Expected (None, 1, 1, 10) as an output shape, but the model gives: (None, 1, 1, 512)
I'm not sure if this is an expected behaviour, but seems like the argument
classes
cannot affects the model when theinclude_top
flag is off. https://github.com/keras-team/keras-applications/blob/4cef2452d27375e3a6c28ae89118174c72473ac2/keras_applications/vgg19.py#L187-L198If it is okay, I'd like to make a PR with some corresponding test code. Thanks for the wonderful work by the way, will look forward to your comment. :)