Crooping2D/3D does not have exception handling for the Crooping parameter
@PhyllisJi,
From the docs here ([keras.io/layers/convolutional](http://keras.io/layers/convolutional)) it looks like you can input how many rows/cols to crop and whether it is from the top/bottom left/right using the cropping tuple you are passing, eg: "If tuple of 2 tuples of 2 ints: interpreted as ((top_crop, bottom_crop), (left_crop, right_crop))" If you only wanted to to crop the right of the image, for example, pass cropping=((0, 0), (0, 1))
https://www.tensorflow.org/api_docs/python/tf/keras/layers/Cropping2D

Thank you! > @PhyllisJi, From the docs here ([keras.io/layers/convolutional](http://keras.io/layers/convolutional)) it looks like you can input how many rows/cols to crop and whether it is from the top/bottom left/right using the cropping tuple you are passing, eg: "If tuple of 2 tuples of 2 ints: interpreted as ((top_crop, bottom_crop), (left_crop, right_crop))" If you only wanted to to crop the right of the image, for example, pass cropping=((0, 0), (0, 1)) https://www.tensorflow.org/api_docs/python/tf/keras/layers/Cropping2D
> 
> Thank you!

Thank you for your reply, but I think according to the document, this parameter should not be filled in negative numbers, tf should check and verify the input. @PhyllisJi ,
TensorFlow allows you to specify **-ve** values for cropping because there are some situations where you may want to crop pixels from the input tensor in the opposite direction. 

Eg: If you are using a convolutional neural network (**CNN**) to classify images of objects, you may want to crop away the borders of the images before feeding them into the CNN. This can help to improve the performance of the CNN, as it can reduce the amount of unwanted information that the CNN has to process.

In most cases you want to specify **+ve** values for cropping. However, it is important to be aware that you can specify -ve values, and that TensorFlow will not check whether the values are `+ve or -ve`. If the cropping value is specified as an integer, TensorFlow is expected to handle both the +ve and -ve values. The +ve values would result in cropping from the corresponding edge, and -ve values would result in zero-padding from the corresponding edge. 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. 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/61255">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/61255">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf2.12.0

### Custom code

Yes

### OS platform and distribution

MacOs

### Mobile device

_No response_

### Python version

3.9

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When the value type of **Cropping** in **Cropping2D** is int, tf doesn't check whether **Cropping**  is positive or negative. This is also true for Cropping3D but not Cropping1D. 

### Standalone code to reproduce the issue

```shell
from tensorflow import keras


def squeezenet(label_num=1000, input_shape=(224, 224, 3)):
# squeezenet input layer
    input_tensor = keras.Input(shape=input_shape)
# squeezenet hidden layer
    x = keras.layers.Conv2D(filters=96, activation="relu", kernel_size=(7,7), strides=2, padding="valid")(input_tensor)
    x = keras.layers.Cropping2D(cropping=-100)(x)
# squeezenet output layer
    output_tensor = keras.layers.Flatten()(keras.layers.Dense(units=label_num, activation="softmax")(x))
    model = keras.models.Model(inputs=input_tensor, outputs=output_tensor)
    return model


if __name__ == "__main__":
    squeezenet().summary()
```


### Relevant log output

```shell
Model: "model"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 input_1 (InputLayer)        [(None, 224, 224, 3)]     0         
                                                                 
 conv2d (Conv2D)             (None, 109, 109, 96)      14208     
                                                                 
 cropping2d (Cropping2D)     (None, 91, 91, 96)        0         
                                                                 
 dense (Dense)               (None, 91, 91, 1000)      97000     
                                                                 
 flatten (Flatten)           (None, 8281000)           0         
                                                                 
=================================================================
Total params: 111,208
Trainable params: 111,208
Non-trainable params: 0
```
```
