Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

add pyrdown/pyrup documentation

edgarribaf51bab7829de
diff --git a/docs/source/filtering.rst b/docs/source/filtering.rst
index 277eceb22..a151f23b5 100644
--- a/docs/source/filtering.rst
+++ b/docs/source/filtering.rst
@@ -12,6 +12,10 @@ The functions in this sections perform various image filtering operations.
.. autofunction:: gaussian_blur
.. autofunction:: laplacian
+.. autofunction:: pyrdown
+.. autofunction:: pyrup
.. autoclass:: GaussianBlur
.. autoclass:: Laplacian
+.. autoclass:: PyrDown
+.. autoclass:: PyrUp
diff --git a/torchgeometry/image/pyramid.py b/torchgeometry/image/pyramid.py
index d4fa13efb..1b09d82c3 100644
--- a/torchgeometry/image/pyramid.py
+++ b/torchgeometry/image/pyramid.py
@@ -30,6 +30,10 @@ class PyrDown(nn.Module):
Return:
torch.Tensor: the downsampled tensor.
+
+ Examples:
+ >>> input = torch.rand(1, 2, 4, 4)
+ >>> output = tgm.image.PyrDown()(input) # 1x2x2x2
"""
def __init__(self) -> None:
@@ -60,6 +64,10 @@ class PyrUp(nn.Module):
Return:
torch.Tensor: the upsampled tensor.
+
+ Examples:
+ >>> input = torch.rand(1, 2, 4, 4)
+ >>> output = tgm.image.PyrUp()(input) # 1x2x8x8
"""
def __init__(self):