Skip to content

Commit

Permalink
lint + doc
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed May 31, 2024
1 parent 2adf894 commit d926a83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion torchvision/transforms/v2/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:


class GaussianNoise(Transform):
"""Add gaussian noise to the image.
"""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.
Expand Down
1 change: 0 additions & 1 deletion torchvision/transforms/v2/functional/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from torch.nn.functional import conv2d, pad as torch_pad

from torchvision import tv_tensors
from torchvision.transforms import _functional_pil as _FP
from torchvision.transforms._functional_tensor import _max_value
from torchvision.transforms.functional import pil_to_tensor, to_pil_image

Expand Down

0 comments on commit d926a83

Please sign in to comment.