Dataloader throws error when iterating

It sounds like you need to implement a custom collate_fn() - you can see this thread for how people deal with batches of variable sizes How to create a dataloader with variable-size input - #13 by pinocchio