How to use variable-sized input to Dataloader

A simple way would be to use a custom collate function and collect the variable-sized data to make a batch.
There are other advanced solutions with padded_sequences, as well.