rwth-i6 / pytorch-to-returnn

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

fix matmul #35

Closed vieting closed 3 years ago

vieting commented 3 years ago

I added a test for the case of multiple shared remaining axes which failed. To fix it, I added Matmul._get_output_shape_from_returnn. Additionally, in Matmul.create_returnn_layer_dict, var1 and var2 should be created by inserting at the beginning of the list, not by appending. Otherwise, the output order in returnn is reversed.