you might want to write a custom collate_fn, instead of the default one: https://github.com/pytorch/pytorch/blob/master/torch/utils/data/dataloader.py#L82 83
DataLoader takes a collate_fn as one of it’s keyword argument, the default value is default_collate