Try to build a dataloader and add this collate function:
def collate_fn(batch):
    return tuple(zip(*batch))

if you look at the output of DataLoader in this colab notebook from pytorch doc 11 , the output is in a kind of big tuple.