summaryrefslogtreecommitdiff
path: root/text_recognizer/models
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/models')
-rw-r--r--text_recognizer/models/base.py5
-rw-r--r--text_recognizer/models/transformer.py4
2 files changed, 4 insertions, 5 deletions
diff --git a/text_recognizer/models/base.py b/text_recognizer/models/base.py
index 90752e9..f917635 100644
--- a/text_recognizer/models/base.py
+++ b/text_recognizer/models/base.py
@@ -2,12 +2,11 @@
from typing import Any, Dict, Optional, Tuple, Type
import hydra
+import torch
from loguru import logger as log
from omegaconf import DictConfig
from pytorch_lightning import LightningModule
-import torch
-from torch import nn
-from torch import Tensor
+from torch import Tensor, nn
from torchmetrics import Accuracy
from text_recognizer.data.mappings import EmnistMapping
diff --git a/text_recognizer/models/transformer.py b/text_recognizer/models/transformer.py
index f44241d..dcec756 100644
--- a/text_recognizer/models/transformer.py
+++ b/text_recognizer/models/transformer.py
@@ -1,9 +1,9 @@
"""Lightning model for base Transformers."""
from typing import Optional, Tuple, Type
-from omegaconf import DictConfig
import torch
-from torch import nn, Tensor
+from omegaconf import DictConfig
+from torch import Tensor, nn
from text_recognizer.data.mappings import EmnistMapping
from text_recognizer.models.base import LitBase