diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-02 01:45:34 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-02 01:45:34 +0200 |
| commit | ffec11ce67d8fe75ea0d5dde5ddf17eb1017fa7d (patch) | |
| tree | db8c78232e588b12d7a8b408682783e0b5858615 /text_recognizer/networks/convnext/residual.py | |
| parent | cf2a827db5798a245dd5207685251675d311dbec (diff) | |
Add comments
Diffstat (limited to 'text_recognizer/networks/convnext/residual.py')
| -rw-r--r-- | text_recognizer/networks/convnext/residual.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/text_recognizer/networks/convnext/residual.py b/text_recognizer/networks/convnext/residual.py index 8e76ae9..dfc2847 100644 --- a/text_recognizer/networks/convnext/residual.py +++ b/text_recognizer/networks/convnext/residual.py @@ -5,9 +5,12 @@ from torch import Tensor, nn class Residual(nn.Module): + """Residual layer.""" + def __init__(self, fn: Callable) -> None: super().__init__() self.fn = fn def forward(self, x: Tensor) -> Tensor: + """Applies residual fn.""" return self.fn(x) + x |