Hey,
It’s actually pretty easy to create a new dataset/loader by inheriting data.Dataset.  I’d recommend just looking at how its done in the visions repo: https://github.com/pytorch/vision/tree/master/torchvision/datasets 213
And then just create a custom collate function based on the way you would like to structure your batches.  A buddy of mine and I created one for VOC Detection if you want to check out this PR for an idea: https://github.com/pytorch/vision/pull/86 127  It’ll also be in a detection implementation I should have up by later today if you want to get a better feel for how its used…