tf.keras.ops.swapaxes

Interchange two axes of a tensor.

x Input tensor.
axis1 First axis.
axis2 Second axis.

A tensor with the axes swapped.