I don’t get it. I have the same problem like OP had. I am loading data like this:

my_loader = DataLoader(my_dataset, batch_size=128, shuffle=True)

How should I use that collate_fn function (what is the “batch” argument? )? What should I do in the for loop?