From 8eec5f3d4ce41c2ba30f0f1ab3f506fc3c0dd263 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 18 Sep 2022 18:12:54 +0200 Subject: Formats --- text_recognizer/models/base.py | 5 ++--- text_recognizer/models/transformer.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'text_recognizer/models') 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 -- cgit v1.2.3-70-g09d2