summaryrefslogtreecommitdiff
path: root/text_recognizer/data/transforms
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/data/transforms')
-rw-r--r--text_recognizer/data/transforms/load_transform.py7
-rw-r--r--text_recognizer/data/transforms/pad.py2
2 files changed, 4 insertions, 5 deletions
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: