Unverified Commit cb512ea6 authored by Haochen Yu's avatar Haochen Yu Committed by GitHub
Browse files

Fix issue 7911 (#7978)


Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
parent d80d5bd2
...@@ -1326,7 +1326,7 @@ def erase(img: Tensor, i: int, j: int, h: int, w: int, v: Tensor, inplace: bool ...@@ -1326,7 +1326,7 @@ def erase(img: Tensor, i: int, j: int, h: int, w: int, v: Tensor, inplace: bool
def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None) -> Tensor: def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None) -> Tensor:
"""Performs Gaussian blurring on the image by given kernel. """Performs Gaussian blurring on the image by given kernel.
If the image is torch Tensor, it is expected If the image is torch Tensor, it is expected
to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. to have [..., H, W] shape, where ... means at most one leading dimension.
Args: Args:
img (PIL Image or Tensor): Image to be blurred img (PIL Image or Tensor): Image to be blurred
......
...@@ -1760,7 +1760,7 @@ class RandomErasing(torch.nn.Module): ...@@ -1760,7 +1760,7 @@ class RandomErasing(torch.nn.Module):
class GaussianBlur(torch.nn.Module): class GaussianBlur(torch.nn.Module):
"""Blurs image with randomly chosen Gaussian blur. """Blurs image with randomly chosen Gaussian blur.
If the image is torch Tensor, it is expected If the image is torch Tensor, it is expected
to have [..., C, H, W] shape, where ... means an arbitrary number of leading dimensions. to have [..., C, H, W] shape, where ... means at most one leading dimension.
Args: Args:
kernel_size (int or sequence): Size of the Gaussian kernel. kernel_size (int or sequence): Size of the Gaussian kernel.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment