title: Transfer learning with Keras ResNet50 model making python to stop working
body: <p>I am using Keras version 2.0.5 with theano as the backend on Python version 3.6.<br>
  I am trying to implement a transfer learning by using <code>ResNet50</code> model, and have used the code given in the following example: <a href="https://keras.io/applications/" rel="nofollow noreferrer">https://keras.io/applications/</a>
  Adding the following line to the code is making python to stop working:  </p>
  
  <pre><code>model = ResNet50(weights='imagenet')
  </code></pre>
  
  <p>I have tried changing the model definition as suggested in other links to:  </p>
  
  <pre><code>model = ResNet50(include_top=False, weights='imagenet',input_shape=(3,224,224))
  </code></pre>
  
  <p>but this gives me another error:  </p>
  
  <blockquote>
    <p>ValueError: The input must have 3 channels; got `input_shape=(3, 224,
    224)</p>
  </blockquote>
  
  <p>The code is as follows:</p>
  
  <pre><code>from keras.applications.resnet50 import ResNet50
  from keras.preprocessing import image
  from keras.applications.resnet50 import preprocess_input, decode_predictions
  import numpy as np
  
  model = ResNet50(include_top=False, weights='imagenet',input_shape=(3,224,224))
  </code></pre>
  
  <p>My theano config file:(theanorc)</p>
  
  <pre><code>[global]
  floatX = float32
  device = cpu
  
  [nvcc]
  compiler_bindir=C:\Program Files (x86)\Microsoft Visual 
  Studio\Shared\14.0\VC\bin
  </code></pre>
  
  <p>My keras config file:(keras.json):</p>
  
  <pre><code>{
  "epsilon": 1e-07,
  "image_data_format": "channels_first",
  "image_dim_ordering": "th",
  "backend": "theano",
  "floatx": "float32"
  }
  </code></pre>