-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Hi,
I have variable length sequences and I am zero padding them and adding them to a batch. I am using LSTM decorated with a Sequencer to classify these sequences. I have two questions:
-
Does it matter if I zero pad smaller sequences on LEFT or RIGHT? Following discussion How to use MaskZero with LSTM and nn.ClassNLLCriterion for variable length squences #75 suggests left padding should be done. Is this correct?
-
Does
MaskZeroskip all the zeros in the input while forward and backward or it only skips those zeros which are continuous and till the end of tensor. How doesMakeZerodifferentiate whether zero in the input row is actual data or padding?
For ex. A sequence can look like this: 4, 5, 0, 5, 0, 0, 0
Will MaskZero process the zero at third location correctly?