From 6f21058f55ab9146673cf0098dc27869aee4090c Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 27 Jun 2021 20:27:25 +0200 Subject: Remove unused imports --- text_recognizer/models/transformer.py | 5 +---- text_recognizer/models/vqvae.py | 10 +++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'text_recognizer/models') diff --git a/text_recognizer/models/transformer.py b/text_recognizer/models/transformer.py index 8dd4db2..bc7e313 100644 --- a/text_recognizer/models/transformer.py +++ b/text_recognizer/models/transformer.py @@ -1,12 +1,9 @@ """PyTorch Lightning model for base Transformers.""" from typing import Dict, List, Optional, Union, Tuple, Type -from omegaconf import DictConfig, OmegaConf -import pytorch_lightning as pl -import torch +from omegaconf import DictConfig from torch import nn from torch import Tensor -import torch.nn.functional as F import wandb from text_recognizer.data.emnist import emnist_mapping diff --git a/text_recognizer/models/vqvae.py b/text_recognizer/models/vqvae.py index 9857420..18e8691 100644 --- a/text_recognizer/models/vqvae.py +++ b/text_recognizer/models/vqvae.py @@ -1,10 +1,9 @@ """PyTorch Lightning model for base Transformers.""" from typing import Any, Dict, Union, Tuple, Type -from omegaconf import DictConfig, OmegaConf +from omegaconf import DictConfig from torch import nn from torch import Tensor -import torch.nn.functional as F import wandb from text_recognizer.models.base import LitBaseModel @@ -35,7 +34,12 @@ class LitVQVAEModel(LitBaseModel): """Logs prediction on image with wandb.""" try: self.logger.experiment.log( - {title: [wandb.Image(data[0]), wandb.Image(reconstructions[0]),]} + { + title: [ + wandb.Image(data[0]), + wandb.Image(reconstructions[0]), + ] + } ) except AttributeError: pass -- cgit v1.2.3-70-g09d2