core dumped Error with tf.raw_ops.QuantizeAndDequantizeV4
@sachinprasadhs,
I was able to reproduce the issue/error on tensorflow v2.13 and tf-nightly. Kindly find the screenshot below for the reference.

<img width="567" alt="image (22)" src="https://github.com/tensorflow/tensorflow/assets/81610181/9e4c9db2-d7f3-4b83-b719-4165cd035e20">

<img width="567" alt="image (23)" src="https://github.com/tensorflow/tensorflow/assets/81610181/be607840-eeae-4e4e-923e-ad7af2990250">
 @GwiHwan-Go,
I tried to execute the mentioned code on tf-nightly and the code was executed with the error and also observed that the crash did not happen. And the same has been in the respective files. Kindly find the [gist](https://colab.research.google.com/gist/tilakrayal/b1597c68ee31839c1f0d8e006770fbb0/untitled1687.ipynb) for the [reference](https://colab.research.google.com/gist/tilakrayal/47842479824cd16fa3773a49640bf860/untitled1689.ipynb).

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L22

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/resource_variable_ops.cc#L1120

```
// Check data type of update and resource to scatter.
const DataType update_dtype = c->input(2).dtype();
OP_REQUIRES(c, v->tensor()->dtype() == update_dtype,
errors::InvalidArgument(
"DType of scatter resource and updates does not match."));

```

Thank you! close the issue as it is fixed on latest version of tf 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/62055">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/62055">No</a>

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

v1.12.1-100714-gd8e55c05473 2.15.0-dev20231005

### Custom code

Yes

### OS platform and distribution

Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

11.8

### GPU model and memory

_No response_

### Current behavior?

Description:

While using the tf.raw_ops.QuantizeAndDequantizeV4 operation, I encountered a core dumped error with specific input parameters.


### Standalone code to reproduce the issue

```shell
import tensorflow as tf 

args = {
    'axis': -1, 
    'input': tf.random.uniform(shape=[]),
    'input_max': tf.random.uniform(shape=[1,8,5]),
    'input_min': tf.random.uniform(shape=[0,5]),
    'name': 'not defined', 
    'narrow_range': True, 
    'num_bits': 2, 
    'range_given': True,
    'round_mode': 'HALF_TO_EVEN',
    'signed_input': True
}

res = tf.raw_ops.QuantizeAndDequantizeV4(**args)
print(res)
```


### Relevant log output

```shell
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-10-05 23:52:34.898354: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-10-05 23:52:38.109515: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 6826 MB memory:  -> device: 0, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:02:00.0, compute capability: 7.5
2023-10-05 23:52:38.110141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 6826 MB memory:  -> device: 1, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:04:00.0, compute capability: 7.5
2023-10-05 23:52:38.110688: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:2 with 6826 MB memory:  -> device: 2, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:83:00.0, compute capability: 7.5
2023-10-05 23:52:38.111251: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:3 with 4528 MB memory:  -> device: 3, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:84:00.0, compute capability: 7.5
2023-10-05 23:52:38.268849: F tensorflow/core/framework/tensor.cc:852] Check failed: 1 == NumElements() (1 vs. 0)Must have a one element tensor
Aborted (core dumped)
```
