summaryrefslogtreecommitdiff
path: root/training/conf/lr_scheduler
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-19 20:58:36 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-19 20:58:36 +0200
commit8689e8da65ed02a13975956d70216d7f33db1688 (patch)
treeb5ce932f0db01ec3fe1bc0b634992a6c11e05c61 /training/conf/lr_scheduler
parent2a6f02f22a58d281519d3827ea956af5c02a8ea2 (diff)
Fix lr and optim conf
Diffstat (limited to 'training/conf/lr_scheduler')
-rw-r--r--training/conf/lr_scheduler/cosine_annealing.yaml7
-rw-r--r--training/conf/lr_scheduler/one_cycle.yaml17
-rw-r--r--training/conf/lr_scheduler/reduce_on_plateau.yaml12
3 files changed, 36 insertions, 0 deletions
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