From e3669927b47b5367a3348d30c4b318da84af661d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 2 Apr 2023 11:14:03 +0200 Subject: Update dataset format: Separate prompt and keywords --- training/functional.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'training') diff --git a/training/functional.py b/training/functional.py index b9fb546..96ecbc1 100644 --- a/training/functional.py +++ b/training/functional.py @@ -522,9 +522,12 @@ def train_loop( accelerator.wait_for_everyone() - lr = lr_scheduler.get_last_lr()[0] - if torch.is_tensor(lr): - lr = lr.item() + if isDadaptation: + lr = optimizer.param_groups[0]["d"] * optimizer.param_groups[0]["lr"] + else: + lr = lr_scheduler.get_last_lr()[0] + if torch.is_tensor(lr): + lr = lr.item() lrs.append(lr) -- cgit v1.2.3-70-g09d2