diff options
Diffstat (limited to 'training')
-rw-r--r-- | training/functional.py | 9 |
1 files changed, 6 insertions, 3 deletions
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( | |||
522 | 522 | ||
523 | accelerator.wait_for_everyone() | 523 | accelerator.wait_for_everyone() |
524 | 524 | ||
525 | lr = lr_scheduler.get_last_lr()[0] | 525 | if isDadaptation: |
526 | if torch.is_tensor(lr): | 526 | lr = optimizer.param_groups[0]["d"] * optimizer.param_groups[0]["lr"] |
527 | lr = lr.item() | 527 | else: |
528 | lr = lr_scheduler.get_last_lr()[0] | ||
529 | if torch.is_tensor(lr): | ||
530 | lr = lr.item() | ||
528 | 531 | ||
529 | lrs.append(lr) | 532 | lrs.append(lr) |
530 | 533 | ||