Hi everyone,
I have a very peculiar use case where some sequences in a batch start “later” than others. For example, consider the following batch:
t | 0 | 1 | 2 | 3 | 4 |
0| a | b | c | d | e |
1|==| g  | h | k | m|
2|==|==|==| n | o|
Here, the 0’th sequence starts at time 0, first at time 1 and 2nd at time 3. The corresponding PackedSequence would be something like PackedSequence(data=[a, b, c, d, e, g, h, k, m, n, o], batch_sizes=[1, 2, 2, 3, 3]). Is there a good way to represent this “left-padded” batch as a PackedSequence and pass it to an RNN, e.g. LSTM and GRU? Or is the only way to left pad the batch manually and mask the outputs (which is not ideal b/c the initial hidden states wouldn’t be zeros for sequences that start later)?
I hope I was clear enough. If not, please let me know so I can clarify. Thanks for your help in advance!