title: InvalidArgumentError with model.fit in Tensorflow
body: <p>Image classification with CNN. When the <code>model.fit()</code> is called, it starts to train the model for a while and is interrupted in the middle of execution and returns an error message.</p>
  <p><strong>Error message</strong> as below</p>
  <pre><code>InvalidArgumentError: 2 root error(s) found.
    (0) Invalid argument:  Input size should match (header_size + row_size * abs_height) but they differ by 2
       [[{{node decode_image/DecodeImage}}]]
       [[IteratorGetNext]]
       [[IteratorGetNext/_4]]
    (1) Invalid argument:  Input size should match (header_size + row_size * abs_height) but they differ by 2
       [[{{node decode_image/DecodeImage}}]]
       [[IteratorGetNext]]
  0 successful operations.
  0 derived errors ignored. [Op:__inference_train_function_8873]
  
  Function call stack:
  train_function -&gt; train_function
  </code></pre>
  <p><strong>Update:</strong> My suggestion is to check the metadata of the dataset. It helped to fix my problem.</p>