I have a tensor of shape (30, 116, 10)
, and I want to swap the first two dimensions, so that I have a tensor of shape (116, 30, 10)
I saw that numpy as such a function implemented (np.swapaxes
) and I searched for something similar in tensorflow but I found nothing.
Do you have any idea?
(2, 3, 4, 5)
will end up as(2, 3, 5, 4)
but the same should work on an input of shape(3, 4, 5, 6, 7)
(and turn it into(3, 4, 5, 7, 6)
) – Ba