From 6d09974b8d34274f17175848afbe8df7c275280c Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 1 Feb 2024 21:49:39 +0000 Subject: [PATCH] (doc/fluxion/padding) add/convert docstrings to mkdocstrings format --- src/refiners/fluxion/layers/padding.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/refiners/fluxion/layers/padding.py b/src/refiners/fluxion/layers/padding.py index c65f472..2c34813 100644 --- a/src/refiners/fluxion/layers/padding.py +++ b/src/refiners/fluxion/layers/padding.py @@ -1,8 +1,19 @@ -from torch import nn +from torch.nn import ReflectionPad2d as _ReflectionPad2d from refiners.fluxion.layers.module import Module -class ReflectionPad2d(nn.ReflectionPad2d, Module): +class ReflectionPad2d(_ReflectionPad2d, Module): + """Reflection padding layer. + + This layer wraps [`torch.nn.ReflectionPad2d`][torch.nn.ReflectionPad2d]. + + Receives: + (Float[Tensor, "batch channels in_height in_width"]): + + Returns: + (Float[Tensor, "batch channels out_height out_width"]): + """ + def __init__(self, padding: int) -> None: super().__init__(padding=padding)