From 9ce21f569ecac03f15f2ad669fde3dd4a512f8cc Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 15 Apr 2024 21:47:54 +0200 Subject: Format --- text_recognizer/model/base.py | 4 ++-- text_recognizer/model/transformer.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'text_recognizer/model') 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 -- cgit v1.2.3-70-g09d2