rwth-i6 / pytorch-to-returnn

Make PyTorch code runnable within RETURNN
3 stars 6 forks source link

Add permute #74

Closed vieting closed 2 years ago

vieting commented 2 years ago

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.

albertz commented 2 years ago

This is ready, right? Or is there any reason this is still in draft state?

vieting commented 2 years ago

Yes, it's ready.