Pad and pack sequences with various length for continuous prediction

Hello, I’m now trying to implement a continuous prediction model using rnn/lstm. so the inputs are some multivariate sequences with different lengths and there’s a binary target correspond to each timestep in each sequence, so the predictions are made for every timestep in all sequences.

I’m a little bit confused with the pad_sequence and pack_padded_sequence functions, are they necessary in this case? if I pad the sequences, do I need to pad the labels as well?

any help is appreciated!