tf.keras.ops.swapaxes

Interchange two axes of a tensor.

xInput tensor.
axis1First axis.
axis2Second axis.

A tensor with the axes swapped.