diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-02 02:58:00 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-02 02:58:00 +0200 |
commit | 75c41a3866c7f842996f6f046b94563be4132a83 (patch) | |
tree | 9861c6f737d3331ef423363ae3bd974593328e6b /text_recognizer/networks | |
parent | 09bb189ba19304d26ede208fe43c3c882c309d7f (diff) |
Update docstrings
Diffstat (limited to 'text_recognizer/networks')
-rw-r--r-- | text_recognizer/networks/text_decoder.py | 2 | ||||
-rw-r--r-- | text_recognizer/networks/transformer/decoder.py | 2 |
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, |