title: MobileNets for a custom image size
body: <p>I want to use the MobileNet model pre-trained on ImageNet for feature extraction. I am loading the model as follows:</p>
  
  <pre><code>from keras.applications.mobilenet import MobileNet
  
  feature_model = MobileNet(include_top=False, weights='imagenet', input_shape=(200, 200, 3))
  </code></pre>
  
  <p>The Keras manual <a href="https://keras.io/applications/#mobilenet" rel="nofollow noreferrer">clearly says</a> that this input shape is valid:</p>
  
  <blockquote>
    <p>input_shape: optional shape tuple, only to be specified if include_top is False (otherwise the input shape has to be (224, 224, 3) (with 'channels_last' data format) or (3, 224, 224) (with 'channels_first' data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.</p>
  </blockquote>
  
  <p>However, I get the following error message:</p>
  
  <blockquote>
    <p>ValueError: If imagenet weights are being loaded, input must have a static square shape (one of (128, 128), (160, 160), (192, 192), or (224, 224)). Input shape provided = (200, 200, 3)</p>
  </blockquote>
  
  <p>Why does it require the input shape to match the one it was trained on if I specify <code>include_top=False</code>?</p>
  
  <p>Keras: 2.2.4, TensorFlow: 1.13.1</p>
  
  <p>Update: As @Soroush pointed out, this exception was removed <a href="https://github.com/keras-team/keras-applications/pull/94/commits/9d2664c5df9f2f018637995d6f40ab51d1669b93" rel="nofollow noreferrer">recently</a>. However, the issue was not fully resolved as described <a href="https://github.com/keras-team/keras-applications/issues/92#issuecomment-480958268" rel="nofollow noreferrer">here</a>.</p>
  
  <p>Update2: The problem was resolved by these two pull requests (<a href="https://github.com/keras-team/keras-applications/pull/94" rel="nofollow noreferrer">1</a>, <a href="https://github.com/keras-team/keras-applications/pull/101" rel="nofollow noreferrer">2</a>).</p>