title: Keras VGGnet Pretrained Model Variable Sized Input
body: <p>I want to extract features of a 368x368 sized image with VGG pretrained model. According to documentation VGGnet accepts 224x224 sized images. Is there a way to give variable sized input to Keras VGG?</p>
  
  <p>Here is my code:</p>
  
  <pre><code># VGG Feature Extraction
  x_train = np.random.randint(0, 255, (100, 224, 224, 3))
  base_model = VGG19(weights='imagenet')
  modelVGG = Model(inputs=base_model.input, outputs=base_model.get_layer('block4_conv2').output)
  block4_conv2_features = modelVGG.predict(x_train)
  </code></pre>
  
  <p>Edited code (It works!)</p>
  
  <pre><code># VGG Feature Extraction
  x_train = np.random.randint(0, 255, (100, 368, 368, 3))
  base_model = VGG19(weights='imagenet', include_top=False)
  modelVGG = Model(inputs=base_model.input, outputs=base_model.get_layer('block4_conv2').output)
  block4_conv2_features = modelVGG.predict(x_train)
  </code></pre>