From 9d3e158f48e3e965d67f154e05faaaf1cadbb836 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 10 Oct 2021 18:05:44 +0200 Subject: Update configs --- training/conf/callbacks/lightning/checkpoint.yaml | 9 +++++++++ training/conf/callbacks/lightning/early_stopping.yaml | 6 ++++++ training/conf/callbacks/lightning/learning_rate_monitor.yaml | 4 ++++ 3 files changed, 19 insertions(+) create mode 100644 training/conf/callbacks/lightning/checkpoint.yaml create mode 100644 training/conf/callbacks/lightning/early_stopping.yaml create mode 100644 training/conf/callbacks/lightning/learning_rate_monitor.yaml (limited to 'training/conf/callbacks/lightning') diff --git a/training/conf/callbacks/lightning/checkpoint.yaml b/training/conf/callbacks/lightning/checkpoint.yaml new file mode 100644 index 0000000..b4101d8 --- /dev/null +++ b/training/conf/callbacks/lightning/checkpoint.yaml @@ -0,0 +1,9 @@ +model_checkpoint: + _target_: pytorch_lightning.callbacks.ModelCheckpoint + monitor: val/loss # name of the logged metric which determines when model is improving + save_top_k: 1 # save k best models (determined by above metric) + save_last: true # additionaly always save model from last epoch + mode: min # can be "max" or "min" + verbose: false + dirpath: checkpoints/ + filename: "{epoch:02d}" diff --git a/training/conf/callbacks/lightning/early_stopping.yaml b/training/conf/callbacks/lightning/early_stopping.yaml new file mode 100644 index 0000000..a188df3 --- /dev/null +++ b/training/conf/callbacks/lightning/early_stopping.yaml @@ -0,0 +1,6 @@ +early_stopping: + _target_: pytorch_lightning.callbacks.EarlyStopping + monitor: val/loss # name of the logged metric which determines when model is improving + patience: 16 # how many epochs of not improving until training stops + mode: min # can be "max" or "min" + min_delta: 0 # minimum change in the monitored metric needed to qualify as an improvement diff --git a/training/conf/callbacks/lightning/learning_rate_monitor.yaml b/training/conf/callbacks/lightning/learning_rate_monitor.yaml new file mode 100644 index 0000000..4a14e1f --- /dev/null +++ b/training/conf/callbacks/lightning/learning_rate_monitor.yaml @@ -0,0 +1,4 @@ +learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + log_momentum: false -- cgit v1.2.3-70-g09d2