diff options
-rw-r--r-- | text_recognizer/models/transformer.py | 3 | ||||
-rw-r--r-- | text_recognizer/models/vq_transformer.py | 2 |
2 files changed, 0 insertions, 5 deletions
diff --git a/text_recognizer/models/transformer.py b/text_recognizer/models/transformer.py index 0acc30a..50bf73d 100644 --- a/text_recognizer/models/transformer.py +++ b/text_recognizer/models/transformer.py @@ -5,7 +5,6 @@ import attr import torch from torch import Tensor -from text_recognizer.data.base_mapping import AbstractMapping from text_recognizer.models.metrics import CharacterErrorRate from text_recognizer.models.base import BaseLitModel @@ -14,8 +13,6 @@ from text_recognizer.models.base import BaseLitModel class TransformerLitModel(BaseLitModel): """A PyTorch Lightning model for transformer networks.""" - mapping: Type[AbstractMapping] = attr.ib() - max_output_len: int = attr.ib(default=451) start_token: str = attr.ib(default="<s>") end_token: str = attr.ib(default="<e>") diff --git a/text_recognizer/models/vq_transformer.py b/text_recognizer/models/vq_transformer.py index b419e97..c07efa4 100644 --- a/text_recognizer/models/vq_transformer.py +++ b/text_recognizer/models/vq_transformer.py @@ -5,7 +5,6 @@ import attr import torch from torch import Tensor -from text_recognizer.data.base_mapping import AbstractMapping from text_recognizer.models.transformer import TransformerLitModel @@ -13,7 +12,6 @@ from text_recognizer.models.transformer import TransformerLitModel class VqTransformerLitModel(TransformerLitModel): """A PyTorch Lightning model for transformer networks.""" - mapping: Type[AbstractMapping] = attr.ib() alpha: float = attr.ib(default=1.0) def forward(self, data: Tensor) -> Tensor: |