From 8689e8da65ed02a13975956d70216d7f33db1688 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 19 Jun 2022 20:58:36 +0200 Subject: Fix lr and optim conf --- training/conf/lr_scheduler/cosine_annealing.yaml | 7 +++++++ training/conf/lr_scheduler/one_cycle.yaml | 17 +++++++++++++++++ training/conf/lr_scheduler/reduce_on_plateau.yaml | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 training/conf/lr_scheduler/cosine_annealing.yaml create mode 100644 training/conf/lr_scheduler/one_cycle.yaml create mode 100644 training/conf/lr_scheduler/reduce_on_plateau.yaml (limited to 'training/conf/lr_scheduler') diff --git a/training/conf/lr_scheduler/cosine_annealing.yaml b/training/conf/lr_scheduler/cosine_annealing.yaml new file mode 100644 index 0000000..e8364f0 --- /dev/null +++ b/training/conf/lr_scheduler/cosine_annealing.yaml @@ -0,0 +1,7 @@ +_target_: torch.optim.lr_scheduler.CosineAnnealingLR +T_max: 256 +eta_min: 0.0 +last_epoch: -1 + +interval: epoch +monitor: val/loss diff --git a/training/conf/lr_scheduler/one_cycle.yaml b/training/conf/lr_scheduler/one_cycle.yaml new file mode 100644 index 0000000..20eab9f --- /dev/null +++ b/training/conf/lr_scheduler/one_cycle.yaml @@ -0,0 +1,17 @@ +_target_: torch.optim.lr_scheduler.OneCycleLR +max_lr: 1.0e-3 +total_steps: null +epochs: 512 +steps_per_epoch: 4992 +pct_start: 0.3 +anneal_strategy: cos +cycle_momentum: true +base_momentum: 0.85 +max_momentum: 0.95 +div_factor: 25.0 +final_div_factor: 10000.0 +three_phase: true +last_epoch: -1 +verbose: false +interval: step +monitor: val/loss diff --git a/training/conf/lr_scheduler/reduce_on_plateau.yaml b/training/conf/lr_scheduler/reduce_on_plateau.yaml new file mode 100644 index 0000000..9aa9de4 --- /dev/null +++ b/training/conf/lr_scheduler/reduce_on_plateau.yaml @@ -0,0 +1,12 @@ +_target_: torch.optim.lr_scheduler.ReduceLROnPlateau +mode: min +factor: 0.1 +patience: 10 +threshold: 1.0e-4 +threshold_mode: rel +cooldown: 0 +min_lr: 1.0e-5 +eps: 1.0e-8 +verbose: false +interval: epoch +monitor: val/loss -- cgit v1.2.3-70-g09d2