Overflow bug when running tf.compat.v1.image.resize
Hi @dmc1778 ,

The reported behaviour is replicated with Tf2.13v and tf-nightly and attached gists [2.13v](https://colab.sandbox.google.com/gist/SuryanarayanaY/87da64a1869cd267c221aa9a96a8dfcd/61629.ipynb) and [nightly](https://colab.sandbox.google.com/gist/SuryanarayanaY/b4fc16234d3d76d66b7bf15da6a7da1b/61629-nightly.ipynb) for reference.

We need to have a look into the issue whether this is intended as the error seems generated from TF C++ code itself. 

Thanks! > Hi @dmc1778 ,
> 
> The reported behaviour is replicated with Tf2.13v and tf-nightly and attached gists [2.13v](https://colab.sandbox.google.com/gist/SuryanarayanaY/87da64a1869cd267c221aa9a96a8dfcd/61629.ipynb) and [nightly](https://colab.sandbox.google.com/gist/SuryanarayanaY/b4fc16234d3d76d66b7bf15da6a7da1b/61629-nightly.ipynb) for reference.
> 
> We need to have a look into the issue whether this is intended as the error seems generated from TF C++ code itself.
> 
> Thanks!

I think the bug is arising from the Python backend because C++ throws OP_REQUIRES failed with integer overflow. On both sides, overflow occurs.  This is working as intended.  Those sizes are too big. 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/61629">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/61629">No</a>

### Issue type

Bug

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

No

### Source

binary

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Due to large elements in input list

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import os
import numpy as np
try:
  images_tensor = tf.constant(-15621075306911, shape=[218, 178, 3, 1], dtype=tf.int64,)
  images = tf.identity(images_tensor)
  size_0 = 8968073515812833920
  size_1 = 536870912
  size = [size_0,size_1,]
  method = "nearest"
  align_corners = False
  preserve_aspect_ratio = False
  name = None
  out = tf.compat.v1.image.resize(images=images,size=size,method=method,align_corners=align_corners,preserve_aspect_ratio=preserve_aspect_ratio,name=name,)
except Exception as e:
  print("Error:"+str(e))
```
```


### Relevant log output

```shell
Error:{{function_node __wrapped__ResizeNearestNeighbor_device_/job:localhost/replica:0/task:0/device:CPU:0}} Encountered overflow when multiplying 20527214848 with 536870912, result: -7426279517443850240 [Op:ResizeNearestNeighbor] name: 
```
```
