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/data/transforms/load_transform.py | 7 +++---- text_recognizer/data/transforms/pad.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'text_recognizer/data/transforms') diff --git a/text_recognizer/data/transforms/load_transform.py b/text_recognizer/data/transforms/load_transform.py index cf590c1..e8c57bc 100644 --- a/text_recognizer/data/transforms/load_transform.py +++ b/text_recognizer/data/transforms/load_transform.py @@ -2,11 +2,10 @@ from pathlib import Path from typing import Callable -from loguru import logger as log -from omegaconf import OmegaConf -from omegaconf import DictConfig -from hydra.utils import instantiate import torchvision.transforms as T +from hydra.utils import instantiate +from loguru import logger as log +from omegaconf import DictConfig, OmegaConf TRANSFORM_DIRNAME = ( Path(__file__).resolve().parents[3] / "training" / "conf" / "datamodule" diff --git a/text_recognizer/data/transforms/pad.py b/text_recognizer/data/transforms/pad.py index 1da4534..df1d83f 100644 --- a/text_recognizer/data/transforms/pad.py +++ b/text_recognizer/data/transforms/pad.py @@ -1,8 +1,8 @@ """Pad targets to equal length.""" import torch -from torch import Tensor import torch.functional as F +from torch import Tensor class Pad: -- cgit v1.2.3-70-g09d2