Faster custom RNN loop sequence

Currently i’m learning on HTR, and using CRNN with custom RNN cell model for it and using JIT, is there any ‘pytorch way’ to use PackedSequence for masking input in RNN loop sequence?

AFAIK only default RNN pytorch model (nn.RNN, nn.LSTM, nn.GRU) can accept it, and custom RNN can only use padded sequence which can be add more time for training