skin cancer detection
code is this 
history = model.fit (X_train, y_train, validation_split=0.2,epochs= 5, 
                     batch_size= batch_size, verbose=1, callbacks=[learning_rate_reduction])           
# list all data in history
print(history.keys())
plt.plot('acc')
plt.plot('val_acc')
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()

error is this
ValueError                                Traceback (most recent call last)
Cell In[12], line 1
----> 1 history = model.fit (X_train, y_train, validation_split=0.2,epochs= 5, 
      2                      batch_size= batch_size, verbose=1, callbacks=[learning_rate_reduction])           
      3 # list all data in history
      4 print(history.keys())

File [~\AppData\Roaming\Python\Python311\site-packages\keras\utils\traceback_utils.py:70](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/saiva/Downloads/~/AppData/Roaming/Python/Python311/site-packages/keras/utils/traceback_utils.py:70), in filter_traceback..error_handler(*args, **kwargs)
     67     filtered_tb = _process_traceback_frames(e.__traceback__)
     68     # To get the full stack trace, call:
     69     # `tf.debugging.disable_traceback_filtering()`
---> 70     raise e.with_traceback(filtered_tb) from None
     71 finally:
     72     del filtered_tb

File [~\AppData\Local\Temp\__autograph_generated_file6gyezdc5.py:15](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/saiva/Downloads/~/AppData/Local/Temp/__autograph_generated_file6gyezdc5.py:15), in outer_factory..inner_factory..tf__train_function(iterator)
     13 try:
     14     do_return = True
---> 15     retval_ = ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
     16 except:
     17     do_return = False

ValueError: in user code:

    File "[C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py](file:///C:/Users/saiva/AppData/Roaming/Python/Python311/site-packages/keras/engine/training.py)", line 1284, in train_function  *
        return step_function(self, iterator)
    File "[C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py](file:///C:/Users/saiva/AppData/Roaming/Python/Python311/site-packages/keras/engine/training.py)", line 1268, in step_function  **
        outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "[C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py](file:///C:/Users/saiva/AppData/Roaming/Python/Python311/site-packages/keras/engine/training.py)", line 1249, in run_step  **
        outputs = model.train_step(data)
    File "[C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py](file:///C:/Users/saiva/AppData/Roaming/Python/Python311/site-packages/keras/engine/training.py)", line 1050, in train_step
        y_pred = self(x, training=True)
    File "[C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\utils\traceback_utils.py](file:///C:/Users/saiva/AppData/Roaming/Python/Python311/site-packages/keras/utils/traceback_utils.py)", line 70, in error_handler
        raise e.with_traceback(filtered_tb) from None
    File "[C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\input_spec.py](file:///C:/Users/saiva/AppData/Roaming/Python/Python311/site-packages/keras/engine/input_spec.py)", line 298, in assert_input_compatibility
        raise ValueError(

    ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(None, 300, 300, 3) Hi @SAI557752 
Thank you for reporting the issue.
Please share complete reproducible code in order to expedite the troubleshooting process. It seems like the error is due to the shape mismatch. Your input image is of shape (300, 300, 3) but the shape in the input layer is (244, 244, 3). Both the shapes should be the same. Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. Hi , here the input size of images is  300*300 but expected size is 224*224.   you can do the image resize before using them for training the model. using resize method you can do it. Hi @SAI557752 ,

As you can see the error log which clearly states the reason.

`ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(None, 300, 300, 3)`

As the Log itself suggests you are feeding the dataset of images which are of size (300, 300) but model is built to accept (224,224). Please change the argument `input_shape` of first layer model to `input_shape=(300,300,3)` like `model.add(layers.Dense(..., input_shape=(300,300,3)))`.

Or If you have Input  layer defined explicitly then  `model.add(keras.Input(shape=(300, 300, 3)))` should resolve the error.

Thanks! This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60527">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60527">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Build/Install

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

vs code

### Custom Code

Yes

### OS Platform and Distribution

vs code

### Mobile device

vs code

### Python version

vs code

### Bazel version

vs code

### GCC/Compiler version

vs code

### CUDA/cuDNN version

vs code

### GPU model and memory

vs code

### Current Behaviour?

A bug happened!

### Standalone code to reproduce the issue

```shell
ValueError                                Traceback (most recent call last)
Cell In[12], line 1
----> 1 history = model.fit (X_train, y_train, validation_split=0.2,epochs= 5, 
      2                      batch_size= batch_size, verbose=1, callbacks=[learning_rate_reduction])           
      3 # list all data in history
      4 print(history.keys())

File ~\AppData\Roaming\Python\Python311\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
     67     filtered_tb = _process_traceback_frames(e.__traceback__)
     68     # To get the full stack trace, call:
     69     # `tf.debugging.disable_traceback_filtering()`
---> 70     raise e.with_traceback(filtered_tb) from None
     71 finally:
     72     del filtered_tb

File ~\AppData\Local\Temp\__autograph_generated_file6gyezdc5.py:15, in outer_factory..inner_factory..tf__train_function(iterator)
     13 try:
     14     do_return = True
---> 15     retval_ = ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
     16 except:
     17     do_return = False

ValueError: in user code:

    File "C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py", line 1284, in train_function  *
        return step_function(self, iterator)
    File "C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py", line 1268, in step_function  **
        outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py", line 1249, in run_step  **
        outputs = model.train_step(data)
    File "C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\training.py", line 1050, in train_step
        y_pred = self(x, training=True)
    File "C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
        raise e.with_traceback(filtered_tb) from None
    File "C:\Users\saiva\AppData\Roaming\Python\Python311\site-packages\keras\engine\input_spec.py", line 298, in assert_input_compatibility
        raise ValueError(

    ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(None, 300, 300, 3)
```


### Relevant log output

```shell
Epoch 1/5
```
</details>