`tf.raw_ops.ExtractGlimpse`: Assertion failure in shape inference step
In release build, we can observe unstable intermediate tensor with invalid dim([gist](https://colab.research.google.com/drive/1R454RoZHPVs_ax3WFd-tVEHHp5GHCvpz?usp=sharing)).
```Python
import tensorflow as tf

tf.compat.v1.disable_eager_execution()

x = tf.raw_ops.ExtractGlimpse(
    input=tf.random.normal([1,1,1,1]),
    size=[-2,-2],
    offsets=tf.random.normal([1,2]),
    centered=True,
    normalized=True,
    uniform_noise=True,
    noise='uniform',
    name=None
)

# Prints "True"
print(tf.is_tensor(x))

# Ends up with "ValueError: Dimension -2 must be >= 0"
print(x)
``` Note that many other APIs have same problem because `SetOutputToSizedImage`(a function where error location resides) is a common subroutine of APIs in [`image_ops.cc`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ops/image_ops.cc).
I was able to find below APIs have same behavior.
`tf.raw_ops.QuantizedResizeBilinear`
`tf.raw_ops.ResizeArea`
`tf.raw_ops.ResizeBicubic`
`tf.raw_ops.ResizeBilinear`
`tf.raw_ops.ResizeNearestNeighbor`
`tf.raw_ops.ScaleAndTranslate`
 Hi @Sehun0819 ,

The DCHEK mentioned has proposed fixed in this PR #63089.
### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.17

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04 LTS

### Mobile device

_No response_

### Python version

3.11.7

### Bazel version

6.5.0

### GCC/compiler version

clang 16

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

`tf.raw_ops.ExtractGlimpse` can lead to assertion failure in shape inference step.
Error location is [here](https://github.com/tensorflow/tensorflow/blob/daea84aad67d1fcc8d58c648e1da58ee576445f9/tensorflow/core/ops/image_ops.cc#L57):
```C++
    height = c->MakeDim(vec(0));
```
It makes a dim from input argument without checking negativity.
In debug build, it ends up with assertion failure in [a constructor of `DimensionOrConstant`](https://github.com/tensorflow/tensorflow/blob/daea84aad67d1fcc8d58c648e1da58ee576445f9/tensorflow/core/framework/shape_inference.h#L891-L896).

### Standalone code to reproduce the issue

```Python
import tensorflow as tf

tf.compat.v1.disable_eager_execution()

tf.raw_ops.ExtractGlimpse(
    input=tf.random.normal([1,1,1,1]),
    size=[-2,-2],
    offsets=tf.random.normal([1,2]),
    centered=True,
    normalized=True,
    uniform_noise=True,
    noise='uniform',
    name=None
)
```


### Relevant log output

Release build: Outputs nothing

Debug build:
```shell
2024-02-27 19:02:16.866010: F ./tensorflow/core/framework/shape_inference.h:891] Check failed: val >= 0 || val == InferenceContext::kUnknownDim Dimension must be non-negative or equal to InferenceContext::kUnknownDim but got -2
Aborted (core dumped)
```
