There’s a few ways you can do this.

If you don’t care about seeing all 50k cifar10 samples in one complete pass of the data loader you could pass in a transform that randomly returns noise instead of the image. i.e.

import random

class RandomNoise(object):
    def __init__(self, probability):
         self.probabilit = probability
    def __call__(self, img):
        if random.random() <= self.probability:
            return img.clone().normal_(0,1)
        return img
          
cifar10_dataset = torchvision.datasets.CIFAR10(root="...", download=True, transform=input_transform)


You could sub class CIFAR10 and override the __len__ function to return maybe 100000, then the __getitem__  function would look something like:

def __getitem__(self, index):
    if index < 50000:
        return super(MySubClass, self).__getitem__(index)
    else:
        return torch.Tensor(size).normal_(0,1), torch.Tensor(1).fill_(class_label)