Solved by ptrblck in post #2 
              
              
                I’m unsure if I understand the issue correctly, as a tuple of 5 images would return all images. 
To randomly select one of them, you could use torch.randperm and use it to index the returned images: 
transform = transforms.Compose([
    transforms.ToPILImage(),
    transforms.FiveCrop(size=(10, 10))…