title: ValueError: cannot reshape array of size 50176 into shape (1,224,224,3)
body: <p>I am doing image classification and I trained a model and saved a model. When I try to predict the model, it shows input error. I am building a classifier using ResNet Architecture and initially declared input_size as <strong>224 x 224</strong>. Now I need to predict the class of the test image.</p>
  
  <p>I converted the image into <strong>224x224 numpy array</strong>. when I try the below code </p>
  
  <pre><code>#plot the figure
  fig = plt.figure()
  
  for num,data in enumerate(test_data):
  
      img_num = data[1]
      img_data = data[0]
  
      y = fig.add_subplot(9,3,num+1)
      orig = img_data
      data = img_data.reshape(1,IMG_SIZ,IMG_SIZ,3)
  
      #predict the model
      model_out = model.predict_classes([orig])[0]
  
      if np.argmax(model_out) == 1: str_label='Dog'
      else: str_label='Cat'
  
      y.imshow(orig,cmap = 'gray')
      plt.title(str_label)
      y.axes.get_xaxis().set_visible(False)
      y.axes.get_yaxis().set_visible(False)
  
  
  plt.show()
  plt.savefig('test_labeled.jpg')
  </code></pre>
  
  <p>It shows me the following error</p>
  
  <blockquote>
    <p>ValueError: cannot reshape array of size 50176 into shape
    (1,224,224,3)</p>
  </blockquote>
  
  <p>in what size I have to reshape the correct dimension?</p>
  
  <p>Thanks!</p>