diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-09-11 22:11:04 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-09-11 22:11:04 +0200 |
| commit | 72ce2361f97676fc50ebc6b68b9083a402fa30c5 (patch) | |
| tree | a22f1122c9d8768aba8e05f38366ab40a6701f7e /text_recognizer/network/convnext/residual.py | |
| parent | d784c49566e5a7705539fb4ceb0461bad8f41361 (diff) | |
Update convnext
Diffstat (limited to 'text_recognizer/network/convnext/residual.py')
| -rw-r--r-- | text_recognizer/network/convnext/residual.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/text_recognizer/network/convnext/residual.py b/text_recognizer/network/convnext/residual.py deleted file mode 100644 index dfc2847..0000000 --- a/text_recognizer/network/convnext/residual.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Generic residual layer.""" -from typing import Callable - -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 |