rwth-i6 / pytorch-to-returnn

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

fix for spatial axes with same dim tag #36

Closed vieting closed 3 years ago

vieting commented 3 years ago

Having tensors where multiple axes have the same dim tag lead to problems in _get_input_axis_to_returnn as well as when creating out_returnn_axis_to_torch_axis in _base_get_output_shape_from_returnn. Using the new dim tag format stag-single:<idx>:<name> for spatial axes in returnn (see https://github.com/rwth-i6/returnn/pull/490), we can circumvent this.