rwth-i6 / pytorch-to-returnn

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

Add support for PackedSequences #71

Closed vieting closed 2 years ago

vieting commented 2 years ago

For an example from padertorch that I'd like to import, we need support for PackedSequence. I implemented a first version of what we discussed and would appreciate your feedback on it, @albertz :)

albertz commented 2 years ago

Should we later squash all the commits together? It involves some logical separated changes. If squashing all together is not wanted, you should cleanup the history, and manually squash them together as far as it make sense.

vieting commented 2 years ago

Yes, I'll cleanup the history.

vieting commented 2 years ago

I went back to not wrapping namedtuples. Some checks did not work as I had in mind, because the batch_sizes were not set correctly. Therefore, I updated this part so that they should be correct now. We just assume that they are set correctly in the RETURNN size_placeholder already in the input to the converter.