Aborted (core dumped) in `QuantizedInstanceNorm`
Hi @LongZE666 ,

I have replicated the behaviour with tf-nightly. Attached snapshot below. Thanks!

<img width="1494" alt="Screenshot 2024-05-15 at 9 33 20 AM" src="https://github.com/tensorflow/tensorflow/assets/116063290/c6073836-e118-45bc-86ef-fd3cf391c831">

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16.1

### Custom code

Yes

### OS platform and distribution

Ubuntu 20.04

### 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?

Abort is triggered when the input x does not meet the condition of dimension 4.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

output_range_given = False
given_y_min = 0
given_y_max = 0
variance_epsilon = 1e-05
min_separation = 0.001
x = tf.constant([], shape=[0,0,0,1,1,0,0,0,11,9], dtype=tf.quint8)
x_min = tf.constant(-3.5e+35, shape=[], dtype=tf.float32)
x_max = tf.constant(0, shape=[], dtype=tf.float32)
tf.raw_ops.QuantizedInstanceNorm(x=x, x_min=x_min, x_max=x_max, output_range_given=output_range_given, given_y_min=given_y_min, given_y_max=given_y_max, variance_epsilon=variance_epsilon, min_separation=min_separation)
```


### Relevant log output

```shell
2024-05-14 08:25:37.034690: F tensorflow/core/framework/tensor_shape.cc:45] Check failed: NDIMS == dims() (4 vs. 10)Asking for tensor of 4 dimensions from a tensor of 10 dimensions
Aborted (core dumped)
```
