diff options
author | Volpeon <git@volpeon.ink> | 2023-01-01 19:19:52 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-01-01 19:19:52 +0100 |
commit | adc52fb8821a496bc8d78235bf10466b39df03e0 (patch) | |
tree | 8a6337a6ac10cbe76c55514ab559c647e69fb1aa /training | |
parent | Fixed accuracy calc, other improvements (diff) | |
download | textual-inversion-diff-adc52fb8821a496bc8d78235bf10466b39df03e0.tar.gz textual-inversion-diff-adc52fb8821a496bc8d78235bf10466b39df03e0.tar.bz2 textual-inversion-diff-adc52fb8821a496bc8d78235bf10466b39df03e0.zip |
Updates
Diffstat (limited to 'training')
-rw-r--r-- | training/lr.py | 6 | ||||
-rw-r--r-- | training/optimization.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/training/lr.py b/training/lr.py index 0c5ce9e..3abd2f2 100644 --- a/training/lr.py +++ b/training/lr.py | |||
@@ -102,6 +102,12 @@ class LRFinder(): | |||
102 | losses.append(loss) | 102 | losses.append(loss) |
103 | accs.append(acc) | 103 | accs.append(acc) |
104 | 104 | ||
105 | self.accelerator.log({ | ||
106 | "loss": loss, | ||
107 | "acc": acc, | ||
108 | "lr": lr, | ||
109 | }, step=epoch) | ||
110 | |||
105 | progress_bar.set_postfix({ | 111 | progress_bar.set_postfix({ |
106 | "loss": loss, | 112 | "loss": loss, |
107 | "loss/best": best_loss, | 113 | "loss/best": best_loss, |
diff --git a/training/optimization.py b/training/optimization.py index 3340544..a79944f 100644 --- a/training/optimization.py +++ b/training/optimization.py | |||
@@ -15,7 +15,7 @@ def get_one_cycle_schedule( | |||
15 | warmup: Literal["cos", "linear"] = "cos", | 15 | warmup: Literal["cos", "linear"] = "cos", |
16 | annealing: Literal["cos", "half_cos", "linear"] = "cos", | 16 | annealing: Literal["cos", "half_cos", "linear"] = "cos", |
17 | warmup_exp: int = 1, | 17 | warmup_exp: int = 1, |
18 | annealing_exp: int = 2, | 18 | annealing_exp: int = 1, |
19 | min_lr: int = 0.04, | 19 | min_lr: int = 0.04, |
20 | mid_point: int = 0.3, | 20 | mid_point: int = 0.3, |
21 | last_epoch: int = -1 | 21 | last_epoch: int = -1 |