title: How to convert an image for .tflite input
body: <p>I am trying to get the model (which ran successfully before it was converted to.tflite) to classify test images.</p>
  
  <pre><code>img = Image.open( input_path )
  img.load()
  input_data = np.array(img, dtype=np.int32)
  interpreter.set_tensor(input_details[0]['index'], input_data)
  interpreter.invoke()
  </code></pre>
  
  <p>But I get an error <em>ValueError: Cannot set tensor: Got tensor of type 2 but expected type 1 for input 13</em></p>
  
  <p>This refers to the dtype, and I believe int32 is the correct format, I've tried nearly every other but I still get the error, which isn't very descriptive.</p>
  
  <p>As I have the dtype correct, I presume that I must be converting the image incorrectly. Is there a better way I should be converting this image to submit to the model?</p>