`Check failed` in `tf.raw_ops.CropAndResize` when `boxes` and `box_ind` are empty.
Hi @xl1043237213 ,

Thanks for reporting. I have reproduced the reported check fail and attached screenshot below.

<img width="1505" alt="Screenshot 2024-04-15 at 1 56 32 PM" src="https://github.com/tensorflow/tensorflow/assets/116063290/00ad5a07-01ba-4d98-8648-a57f731339aa">
 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/65629">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/65629">No</a>

### Issue type

Bug

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

Yes

### Source

binary

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

`Check failed` in `tf.raw_ops.CropAndResize` when `boxes` and `box_ind` are empty. `boxes` should be a 2-D tensor of shape [`num_boxes`, 4] and `box_ind` should be 1-D tensor of shape [`num_boxes`], but `num_boxes` can be 0.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/17OaE1dOW1PJH48RSBlpk7YKN1Q3ZYhRW?usp=sharing
```


### Relevant log output

```shell
Check failed: NDIMS == dims() (2 vs. 1)Asking for tensor of 2 dimensions from a tensor of 1 dimensions
Aborted (core dumped)
```
