summaryrefslogtreecommitdiff
path: root/text_recognizer/networks
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/networks')
-rw-r--r--text_recognizer/networks/text_decoder.py2
-rw-r--r--text_recognizer/networks/transformer/decoder.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/text_recognizer/networks/text_decoder.py b/text_recognizer/networks/text_decoder.py
index 7498663..500bcf9 100644
--- a/text_recognizer/networks/text_decoder.py
+++ b/text_recognizer/networks/text_decoder.py
@@ -26,7 +26,7 @@ class TextDecoder(nn.Module):
self.to_logits = nn.Linear(in_features=self.dim, out_features=self.num_classes)
def forward(self, tokens: Tensor, img_features: Tensor) -> Tensor:
- """Decodes latent images embedding into word pieces.
+ """Decodes latent images embedding into logit tokens.
Args:
tokens (Tensor): Token indecies.
diff --git a/text_recognizer/networks/transformer/decoder.py b/text_recognizer/networks/transformer/decoder.py
index 09d2dce..826bc13 100644
--- a/text_recognizer/networks/transformer/decoder.py
+++ b/text_recognizer/networks/transformer/decoder.py
@@ -30,7 +30,7 @@ class Decoder(nn.Module):
context: Optional[Tensor] = None,
mask: Optional[Tensor] = None,
) -> Tensor:
- """Applies the network to the signals."""
+ """Applies attention blocks."""
for block in self.blocks:
x = block(
x=x,