GaussianNoise¶
- class torchvision.transforms.v2.GaussianNoise(mean: float = 0.0, sigma: float = 0.1, clip=True)[source]¶
Add gaussian noise to images or videos.
The input tensor is expected to be in […, 1 or 3, H, W] format, where … means it can have an arbitrary number of leading dimensions. Each image or frame in a batch will be transformed independently i.e. the noise added to each image will be different.
The input tensor is also expected to be of float dtype in
[0, 1]
. This transform does not support PIL images.