`tf.raw_ops.Transpose` aborts with negative `perm` value
@Sehun0819 If removing negative values from the perm argument isn't possible, could you define a mapping function that converts negative values to their positive counterparts based on the dimensions of your tensor. If the negative values are intentional and represent specific transposition directions, please consider using alternative operations that support them. For example, tf.reverse might be suitable depending on your use case?
Thank you! @sushreebarsa Thank you for your response. But I just wanted to inform you it crashes. Please check [it](https://colab.research.google.com/drive/1XtuhjL-l3x2r4KVWj2xeO6xlMD7b0Evh?usp=sharing). @sachinprasadhs I was able to replicate this issue [here](https://colab.research.google.com/gist/sushreebarsa/b6e329989605b868659650bab7a09bb1/untitled9.ipynb), please have a look.
Thank you! 
### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.17

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04 LTS

### Mobile device

_No response_

### Python version

3.11.7

### Bazel version

6.5.0

### GCC/compiler version

clang 16

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

`tf.raw_ops.Transpose` aborts with negative `perm` value. [gist](https://colab.research.google.com/drive/1r0oUxDcu-uWHgjQGOU8qvcSzD1z2fv-a?usp=sharing)

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

tf.raw_ops.Transpose(
    x=tf.random.normal([2,1]),
    perm=[-1,0],
    name=None
)
```


### Relevant log output

```shell
2024-02-20 19:35:25.981306: F tensorflow/core/framework/tensor_shape.cc:356] Check failed: d >= 0 (0 vs. -1)
Aborted (core dumped)
```
