diff options
Diffstat (limited to 'text_recognizer/model')
-rw-r--r-- | text_recognizer/model/base.py | 4 | ||||
-rw-r--r-- | text_recognizer/model/transformer.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/text_recognizer/model/base.py b/text_recognizer/model/base.py index 9a751bf..c662583 100644 --- a/text_recognizer/model/base.py +++ b/text_recognizer/model/base.py @@ -2,11 +2,11 @@ from typing import Any, Dict, Optional, Tuple, Type import hydra +import pytorch_lightning as L import torch from loguru import logger as log from omegaconf import DictConfig -import pytorch_lightning as L -from torch import nn, Tensor +from torch import Tensor, nn from text_recognizer.data.tokenizer import Tokenizer diff --git a/text_recognizer/model/transformer.py b/text_recognizer/model/transformer.py index 5842bdb..783e134 100644 --- a/text_recognizer/model/transformer.py +++ b/text_recognizer/model/transformer.py @@ -3,11 +3,12 @@ from typing import Callable, Optional, Tuple, Type import torch from omegaconf import DictConfig -from torch import nn, Tensor +from torch import Tensor, nn from torchmetrics import CharErrorRate, WordErrorRate -from text_recognizer.decoder.greedy_decoder import GreedyDecoder from text_recognizer.data.tokenizer import Tokenizer +from text_recognizer.decoder.greedy_decoder import GreedyDecoder + from .base import LitBase |