From ffa4be4bf4e3758e01d52a9c1f354a05a90b93de Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 15 Apr 2021 22:05:24 +0200 Subject: Created mappings --- training/configs/image_transformer.yaml | 1 + training/run_experiment.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'training') diff --git a/training/configs/image_transformer.yaml b/training/configs/image_transformer.yaml index 88c05c2..228e53f 100644 --- a/training/configs/image_transformer.yaml +++ b/training/configs/image_transformer.yaml @@ -56,6 +56,7 @@ callbacks: args: monitor: val_loss mode: min + save_last: true - type: StochasticWeightAveraging args: swa_epoch_start: 0.8 diff --git a/training/run_experiment.py b/training/run_experiment.py index f46803f..1e79461 100644 --- a/training/run_experiment.py +++ b/training/run_experiment.py @@ -15,7 +15,7 @@ import wandb SEED = 4711 CONFIGS_DIRNAME = Path(__file__).parent.resolve() / "configs" -LOGS_DIRNAME = Path(__file__).parent.resolve() / "runs" / "logs" +LOGS_DIRNAME = Path(__file__).parent.resolve() / "logs" def _configure_logging(log_dir: Optional[Path], verbose: int = 0) -> None: @@ -67,7 +67,7 @@ def _configure_callbacks( def _configure_logger( - network: Type[nn.Module], args: Dict, log_dir: str, use_wandb: bool + network: Type[nn.Module], args: Dict, log_dir: str, use_wandb: bool ) -> Type[pl.loggers.LightningLoggerBase]: """Configures lightning logger.""" if use_wandb: @@ -124,7 +124,6 @@ def run( _configure_logging(None, verbose=verbose) logger.info("Starting experiment...") - # Seed everything in the experiment. logger.info(f"Seeding everthing with seed={SEED}") pl.utilities.seed.seed_everything(SEED) -- cgit v1.2.3-70-g09d2