title: preprocess_input() method in keras
body: <p>I am trying out sample <code>keras</code> code from the below <code>keras</code> documentation page,
  <a href="https://keras.io/applications/" rel="noreferrer">https://keras.io/applications/</a></p>
  
  <p>What <code>preprocess_input(x)</code> function of <code>keras</code> module does in the below code? Why do we have to do <code>expand_dims(x, axis=0)</code> before that is passed to the <code>preprocess_input()</code> method?</p>
  
  <pre><code>from keras.applications.resnet50 import ResNet50
  from keras.preprocessing import image
  from keras.applications.resnet50 import preprocess_input
  import numpy as np
  
  model = ResNet50(weights='imagenet')
  
  img_path = 'elephant.jpg'
  img = image.load_img(img_path, target_size=(224, 224))
  x = image.img_to_array(img)
  x = np.expand_dims(x, axis=0)
  x = preprocess_input(x)
  </code></pre>
  
  <p>Is there any documentation with a good explanation of these functions?</p>
  
  <p>Thanks!</p>