title: cloud prediction and local prediction doesn't return the same result
body: <p>I trained an image classifier with tensorflow and deployed it in the cloud. When i perform a prediction locally i get a result and when i perform a batch prediction using my deployed model i get a different result.</p>
  
  <p>to perform the prediction locally i use this <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/label_image.py" rel="nofollow noreferrer">script</a></p>
  
  <p>to perform the prediction with the cloud i first resize my image and convert it to a float32 array (the model is trained with that type) and save it as a JSON file using the following : </p>
  
  <pre><code>import skimage, json
  from PIL import Image
  from resizeimage import resizeimage
  
  
  with open('xxx.jpg', 'r+b') as f:
      with Image.open(f) as image:
          resized_image = resizeimage.resize_cover(image, [299,299])
  
  
  
  converted_image = skimage.img_as_float32(resized_image).tolist()
  
  with open('request.json','w') as jsonfile:
      json.dump({"image": converted_image}, jsonfile)
  </code></pre>
  
  <p>and then i upload the request in my cloud bucket and create a job for the prediction as follows:</p>
  
  <pre><code>gcloud ml-engine jobs submit prediction "test_batch_prediction" \
                         --model "xxx" \
                         --input-paths "gs://path/to/my/request/request.json" \
                         --output-path "gs://path/to/where/prediction/will/be/saved/prediction_results/" \
                         --region "europe-west1" \
                         --data-format "text"
  </code></pre>
  
  <p>i think the problem is in resizing the image and converting it to float32 since i'm not using the same methods as tensorflow when performing the training or local prediction. Can this be the problem ? or is there something else i need to worry about.</p>