Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubt regarding MaskZero #433

Open
vguptai opened this issue May 29, 2018 · 0 comments
Open

Doubt regarding MaskZero #433

vguptai opened this issue May 29, 2018 · 0 comments

Comments

@vguptai
Copy link

vguptai commented May 29, 2018

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:

  1. 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?

  2. Does MaskZero skip 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 does MakeZero differentiate 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant