What is the best way to batch with variable size lists?
Specifically, I have a
dataset class that returns 2 lists containing multiple tensors of the same size.
So it can be possible that one instance has 2 lists where the first one has 5 tensors of 200 size and the second one has 4 tensors of 200 size
And on another instance, the first list has 3 tensors of 200 size and the second one has 1 tensor of 200 size.
How to define the
collate_fn function to deal with it?