summaryrefslogtreecommitdiff
path: root/training
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-04-15 22:05:24 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-04-15 22:05:24 +0200
commitffa4be4bf4e3758e01d52a9c1f354a05a90b93de (patch)
tree33a0f51f60cb181ffc562b562a7d09fcc70c5cf5 /training
parent0ab820d3595e4f17d4f1f3c310e186692f65cc67 (diff)
Created mappings
Diffstat (limited to 'training')
-rw-r--r--training/configs/image_transformer.yaml1
-rw-r--r--training/run_experiment.py5
2 files changed, 3 insertions, 3 deletions
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)