summaryrefslogtreecommitdiff
path: root/text_recognizer/networks/conformer/ff.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-12 23:16:20 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-12 23:16:20 +0200
commit8bb76745e43c6b4967c8e91ebaf4c4295d0b8d0b (patch)
tree5ff05d9fea92f7e5bd313d8cdc9559ccbc89a97a /text_recognizer/networks/conformer/ff.py
parent8fe4b36bf22281c84c4afee811b3435f3b50686d (diff)
Remove conformer
Diffstat (limited to 'text_recognizer/networks/conformer/ff.py')
-rw-r--r--text_recognizer/networks/conformer/ff.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/text_recognizer/networks/conformer/ff.py b/text_recognizer/networks/conformer/ff.py
deleted file mode 100644
index 2ef4245..0000000
--- a/text_recognizer/networks/conformer/ff.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Conformer feedforward block."""
-from torch import nn, Tensor
-
-
-class Feedforward(nn.Module):
- def __init__(
- self, dim: int, expansion_factor: int = 4, dropout: float = 0.0
- ) -> None:
- super().__init__()
- self.layers = nn.Sequential(
- nn.Linear(dim, expansion_factor * dim),
- nn.Mish(inplace=True),
- nn.Dropout(dropout),
- nn.Linear(expansion_factor * dim, dim),
- nn.Dropout(dropout),
- )
-
- def forward(self, x: Tensor) -> Tensor:
- return self.layers(x)