Your slicing operation would remove the padding indices in all samples, so I’m unsure if this fits your use case.



 cerebralnetworkdev:

In addition to above about handling variable length sequences in nn.Conv1d, if anyone has tips for Keras’ Masking equivalent would be for PyTorch, I’d also be keen to hear!


Could you explain, what this layer is doing, i.e. how the “masking” is performed and how the outputs and gradients are changed by it?