summaryrefslogtreecommitdiff
path: root/text_recognizer/networks/transformer/norm.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-05-09 00:36:55 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-05-09 00:36:55 +0200
commit548f52b35062e258622ea638ed1b132d6759a07a (patch)
treee9262d0f934ac4f9392f20cb4fcf7be6033e3cb7 /text_recognizer/networks/transformer/norm.py
parent805d5726c17b83e00dcea0d2608dcd83a91f723d (diff)
Attention layer soon done
Diffstat (limited to 'text_recognizer/networks/transformer/norm.py')
-rw-r--r--text_recognizer/networks/transformer/norm.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/text_recognizer/networks/transformer/norm.py b/text_recognizer/networks/transformer/norm.py
index 58c8770..8bc3221 100644
--- a/text_recognizer/networks/transformer/norm.py
+++ b/text_recognizer/networks/transformer/norm.py
@@ -11,17 +11,6 @@ from torch import nn
from torch import Tensor
-class Rezero(nn.Module):
- def __init__(self, fn: Callable) -> None:
- super().__init__()
- self.fn = fn
- self.g = nn.Parameter(torch.zeros(1))
-
- def forward(self, x: Tensor, **kwargs: Dict) -> Tensor:
- x, *rest = self.fn(x, **kwargs)
- return (x * self.g, *rest)
-
-
class ScaleNorm(nn.Module):
def __init__(self, dim: int, eps: float = 1.0e-5) -> None:
super().__init__()