Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

fix docs type with border_type

edgarriba897e6a36f247
diff --git a/kornia/filters/blur.py b/kornia/filters/blur.py
index 9ab11c64c..f166f5402 100644
--- a/kornia/filters/blur.py
+++ b/kornia/filters/blur.py
@@ -49,7 +49,7 @@ class BoxBlur(nn.Module):
"""
def __init__(self, kernel_size: Tuple[int, int],
- border_type: str = 'replicate') -> None:
+ border_type: str = 'reflect') -> None:
super(BoxBlur, self).__init__()
self.kernel_size: Tuple[int, int] = kernel_size
self.border_type: str = border_type
@@ -64,7 +64,7 @@ class BoxBlur(nn.Module):
def box_blur(input: torch.Tensor,
kernel_size: Tuple[int, int],
- border_type: str = 'replicate') -> torch.Tensor:
+ border_type: str = 'reflect') -> torch.Tensor:
r"""Blurs an image using the box filter.
See :class:`~kornia.filters.BoxBlur` for details.
diff --git a/kornia/filters/gaussian.py b/kornia/filters/gaussian.py
index 8e1f0678e..990f8da57 100644
--- a/kornia/filters/gaussian.py
+++ b/kornia/filters/gaussian.py
@@ -124,7 +124,8 @@ class GaussianBlur2d(nn.Module):
"""
def __init__(self, kernel_size: Tuple[int, int],
- sigma: Tuple[float, float], border_type: str) -> None:
+ sigma: Tuple[float, float],
+ border_type: str = 'reflect') -> None:
super(GaussianBlur2d, self).__init__()
self.kernel_size: Tuple[int, int] = kernel_size
self.sigma: Tuple[float, float] = sigma
@@ -147,7 +148,7 @@ def gaussian_blur2d(
input: torch.Tensor,
kernel_size: Tuple[int, int],
sigma: Tuple[float, float],
- border_type: str = "replicate") -> torch.Tensor:
+ border_type: str = 'reflect') -> torch.Tensor:
r"""Function that blurs a tensor using a Gaussian filter.
See :class:`~kornia.filters.GaussianBlur` for details.
diff --git a/kornia/filters/laplacian.py b/kornia/filters/laplacian.py
index 4b36a2efd..0b8314eb6 100644
--- a/kornia/filters/laplacian.py
+++ b/kornia/filters/laplacian.py
@@ -111,7 +111,7 @@ class Laplacian(nn.Module):
"""
def __init__(self,
- kernel_size: int, border_type: str = 'replicate') -> None:
+ kernel_size: int, border_type: str = 'reflect') -> None:
super(Laplacian, self).__init__()
self.kernel_size: int = kernel_size
self.border_type: str = border_type
@@ -129,7 +129,7 @@ class Laplacian(nn.Module):
def laplacian(
input: torch.Tensor,
- kernel_size: int, border_type: str = 'replicate') -> torch.Tensor:
+ kernel_size: int, border_type: str = 'reflect') -> torch.Tensor:
r"""Function that returns a tensor using a Laplacian filter.
See :class:`~kornia.filters.Laplacian` for details.
diff --git a/kornia/geometry/transform/pyramid.py b/kornia/geometry/transform/pyramid.py
index 6bfd7c2ba..dd39f2ea9 100644
--- a/kornia/geometry/transform/pyramid.py
+++ b/kornia/geometry/transform/pyramid.py
@@ -43,7 +43,7 @@ class PyrDown(nn.Module):
>>> output = kornia.transform.PyrDown()(input) # 1x2x2x2
"""
- def __init__(self, border_type: str = 'replicate') -> None:
+ def __init__(self, border_type: str = 'reflect') -> None:
super(PyrDown, self).__init__()
self.border_type: str = border_type
self.kernel: torch.Tensor = _get_pyramid_gaussian_kernel()
@@ -84,7 +84,7 @@ class PyrUp(nn.Module):
>>> output = kornia.transform.PyrUp()(input) # 1x2x8x8
"""
- def __init__(self, border_type: str = 'replicate'):
+ def __init__(self, border_type: str = 'reflect'):
super(PyrUp, self).__init__()
self.border_type: str = border_type
self.kernel: torch.Tensor = _get_pyramid_gaussian_kernel()
@@ -112,7 +112,7 @@ class PyrUp(nn.Module):
def pyrdown(
input: torch.Tensor,
- border_type: str = 'replicate') -> torch.Tensor:
+ border_type: str = 'reflect') -> torch.Tensor:
r"""Blurs a tensor and downsamples it.
See :class:`~kornia.transform.PyrDown` for details.
@@ -120,7 +120,7 @@ def pyrdown(
return PyrDown(border_type)(input)
-def pyrup(input: torch.Tensor, border_type: str = 'replicate') -> torch.Tensor:
+def pyrup(input: torch.Tensor, border_type: str = 'reflect') -> torch.Tensor:
r"""Upsamples a tensor and then blurs it.
See :class:`~kornia.transform.PyrUp` for details.