Keras VGG16 flat-features extractor

Using pre-trained deep learning model as feature extractor is a proven way to improve classification accuracy. One of the famous model is Oxford’s VGG16, which is trained using million images to recognize 1,000 classes ranging from animals, vehicles and other stuffs. Now, to use VGG16 as part of another neural network is relatively easy, especially…

Keras VGG16 with different input shape

Keras graciously provides an API to use pretrained models such as VGG16 easily. Unfortunatey, if we try to use different input shape other than 224 x 224 using given API (keras 1.1.1 & theano 0.9.0dev4) from keras.layers import Input from keras.optimizers import SGD from keras.applications.vgg16 import VGG16 … model = VGG16(weights=’imagenet’, input_tensor=Input(shape=(3, 300, 300))) sgd…