Lstm with different input sizes for each batch

Hello everyone ,

I have made a Collator that pads each tensor(originally sentence) in each batch into the maxlen of each batch.

so I have different input sizes per each batch.

my question is, how can I specify this to the LSTM?

Thank you in advance