I am trying to add gaussian noise as part of the image transforms. I was able to add noise through a tensor. But I want to add noise through PIL Image data. How can I modify the below code block for the same?
class gaussianNoise():
    def __init__(self, mean, stddev):
        self.mean = mean
        self.stddev = stddev

    def __call__(self, tensor):
        noise = torch.zeros_like(tensor).normal_(self.mean, self.stddev)
        return tensor.add_(noise)

    def __repr__(self):
        repr = f"{self.__class__.__name__  }(mean={self.mean},
               stddev={self.stddev})"
        return repr