summaryrefslogtreecommitdiff
path: root/text_recognizer/networks/transformer/residual.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-27 22:16:04 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-27 22:16:04 +0200
commit810d8b2403dd0a229063c5693deac694871243f6 (patch)
tree66ec18e3f90c41d393c269c1e4d3313dd73e0b09 /text_recognizer/networks/transformer/residual.py
parent8a7d47e9a432ec927993cc546dacb89a97a05cda (diff)
Add comments to transformer modules
Diffstat (limited to 'text_recognizer/networks/transformer/residual.py')
-rw-r--r--text_recognizer/networks/transformer/residual.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/text_recognizer/networks/transformer/residual.py b/text_recognizer/networks/transformer/residual.py
index 1547df6..825a0fc 100644
--- a/text_recognizer/networks/transformer/residual.py
+++ b/text_recognizer/networks/transformer/residual.py
@@ -3,6 +3,8 @@ from torch import nn, Tensor
class Residual(nn.Module):
+ """Residual block."""
+
def forward(self, x: Tensor, residual: Tensor) -> Tensor:
"""Applies the residual function."""
return x + residual