a-PyTorch-Tutorial-to-Text-Classification
a-PyTorch-Tutorial-to-Text-Classification copied to clipboard
about the pack&pad operation
Hi, sgrvinod, I've learned a lot from your tutorials.
The usage of pack&pad operation can eliminate redundant padding calculations in the sequence, which is verified by the tutorial. But I'm curious about how to deal with it if a CNN layer is concatenated after it ?
If we just pad_packed_sequence the packed results from RNN/linear layers, then how can we deal with the padding=0? Use another mask operation or any other methods?
Hope for your reply, thanks!