From 75c41a3866c7f842996f6f046b94563be4132a83 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 2 Oct 2022 02:58:00 +0200 Subject: Update docstrings --- text_recognizer/networks/text_decoder.py | 2 +- text_recognizer/networks/transformer/decoder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'text_recognizer') 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, -- cgit v1.2.3-70-g09d2