From 3ab82ad36bce6fa698a13a029a0694b75a5947b7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 6 Aug 2021 02:42:45 +0200 Subject: Fix VQVAE into en/decoder, bug in wandb artifact code uploading --- training/run.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'training/run.py') diff --git a/training/run.py b/training/run.py index 13a6a82..a2529b0 100644 --- a/training/run.py +++ b/training/run.py @@ -13,6 +13,7 @@ from pytorch_lightning import ( ) from pytorch_lightning.loggers import LightningLoggerBase from torch import nn +from torchsummary import summary from text_recognizer.data.base_mapping import AbstractMapping import utils @@ -37,6 +38,9 @@ def run(config: DictConfig) -> Optional[float]: log.info(f"Instantiating network <{config.network._target_}>") network: nn.Module = hydra.utils.instantiate(config.network) + if config.summary: + summary(network, tuple(config.summary), device="cpu") + log.info(f"Instantiating criterion <{config.criterion._target_}>") loss_fn: Type[nn.Module] = hydra.utils.instantiate(config.criterion) -- cgit v1.2.3-70-g09d2