Some errors in `tf.raw_ops.SparseTensorDenseMatMul` when there are negative or too large values in `a_shape`.
Hi @xl1043237213 ,

I have replicated the reported behaviour with tf-nightly and attached screenshot below and [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/a9af875775f8a6340340a44297ea262a/65724.ipynb) for reference.
 <img width="1502" alt="Screenshot 2024-04-18 at 10 54 57 PM" src="https://github.com/tensorflow/tensorflow/assets/116063290/edf9132f-ec8c-447a-8fea-a94e143c7bd2">


<img width="1504" alt="Screenshot 2024-04-18 at 10 53 50 PM" src="https://github.com/tensorflow/tensorflow/assets/116063290/d5c80efa-c146-42be-ae20-da749a1a2347">

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.15

### Custom code

No

### OS platform and distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When there are negative values in `a_shape`, `tf.raw_ops.SparseTensorDenseMatMul` triggers `INVALID_ARGUMENT` error. When there are too large values in `a_shape`, `tf.raw_ops.SparseTensorDenseMatMul` triggers `overflow` error.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/1_dmg1zT1TuYnmPgtlUWSDq8Gg4eeyq0b?usp=sharing
```


### Relevant log output

```shell
Non-OK-status: InitDims(dim_sizes) status: INVALID_ARGUMENT: Expected shape dimensions to be non-negative, got -1

or

Non-OK-status: InitDims(dim_sizes) status: INVALID_ARGUMENT: Encountered overflow when multiplying 9223372036854775804 with 3, result: -1
```
