Add torch.nn.functional.permute and Tensor.permute which uses the previous one. In order to do this, I also fixed out_returnn_axis_from_torch_axis for Transpose. Apparently, we only had cases where two axes were transposed, not where a more complicated transpose was done like 0->1, 1->2, 2->0, so the error did not become obvious before.
Add
torch.nn.functional.permute
andTensor.permute
which uses the previous one. In order to do this, I also fixedout_returnn_axis_from_torch_axis
forTranspose
. Apparently, we only had cases where two axes were transposed, not where a more complicated transpose was done like 0->1, 1->2, 2->0, so the error did not become obvious before.