From the documentation of torch.nn.utils.rnn.PackedSequence 4:

Instances of this class should never be created manually. They are meant to be instantiated by functions like pack_padded_sequence() 3.

Is there possible any better way now to apply the packed sequence with the linear layers?