From 8c7768e8d321efec558e12bff9b89b2de615d541 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 13 May 2021 23:02:20 +0200 Subject: Decoder module working --- text_recognizer/networks/transformer/transformer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'text_recognizer/networks/transformer/transformer.py') diff --git a/text_recognizer/networks/transformer/transformer.py b/text_recognizer/networks/transformer/transformer.py index 36f86ac..60ab1ce 100644 --- a/text_recognizer/networks/transformer/transformer.py +++ b/text_recognizer/networks/transformer/transformer.py @@ -1,5 +1,5 @@ """Transformer wrapper.""" -from typing import Optional, Type +from typing import Any, Optional, Type from torch import nn, Tensor @@ -58,4 +58,4 @@ class Transformer(nn.Module): x = self.project_emb(x) x = self.attn_layers(x, mask=mask, **kwargs) out = self.logits(x) if not return_embeddings else x - return x + return out -- cgit v1.2.3-70-g09d2