Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyProximalAdagrad`
Hi @x0w3n ,
- I was able to reproduce the issue on Colab using TF v2.15 and TF-nightly ,Please find the [gist](https://colab.research.google.com/gist/Venkat6871/a279ab73a9514adbe2a349c98bff883b/69288_2-15-nightly.ipynb) here for reference.

Thank you! Thank you for your response. 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/69288">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/69288">No</a>

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceApplyCenteredRMSProp/tf.raw_ops.ResourceSparseApplyCenteredRMSProp triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. The cause of the crash may be the grad parameter. 

tf.raw_ops.ResourceApplyProximalAdagrad also has the same crash.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceSparseApplyProximalAdagrad(var=var.handle, accum=accum.handle, lr=lr,
                                              l1=0.1, l2=0.2, grad=grad,
                                              indices=tf.constant([1,2,2]),
                                              use_locking=False)
# crash
# tf.raw_ops.ResourceApplyProximalAdagrad(var=var.handle, accum=accum.handle, lr=lr, l1=1, 
#                                         l2=1, grad=grad,
#                                         use_locking=False)
```


### Relevant log output

```shell
2024-06-06 01:28:02.747576: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-06-06 01:28:02.780112: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-06 01:28:03.819782: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```
