rwth-i6 / pytorch-to-returnn

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

simplify and extend padding #65

Closed vieting closed 2 years ago

vieting commented 2 years ago

Currently, the padding logic is build around padding only the spatial dims in RETURNN. However, PyTorch does not care about what dims are spatial and also allows more flexible padding. In order to allow this here, I simplified the logic for padding so that only the order of dims in PyTorch matters.