Skip to content

Commit d926a83

Browse files
committed
lint + doc
1 parent 2adf894 commit d926a83

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

torchvision/transforms/v2/_misc.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
206206

207207

208208
class GaussianNoise(Transform):
209-
"""Add gaussian noise to the image.
209+
"""Add gaussian noise to images or videos.
210210
211211
The input tensor is expected to be in [..., 1 or 3, H, W] format,
212212
where ... means it can have an arbitrary number of leading dimensions.
213+
Each image or frame in a batch will be transformed independently i.e. the
214+
noise added to each image will be different.
213215
214216
The input tensor is also expected to be of float dtype in ``[0, 1]``.
215217
This transform does not support PIL images.

torchvision/transforms/v2/functional/_misc.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from torch.nn.functional import conv2d, pad as torch_pad
77

88
from torchvision import tv_tensors
9-
from torchvision.transforms import _functional_pil as _FP
109
from torchvision.transforms._functional_tensor import _max_value
1110
from torchvision.transforms.functional import pil_to_tensor, to_pil_image
1211

0 commit comments

Comments
 (0)