[NFC] polish colossalai/nn/lr_scheduler/linear.py code style (#1716)

pull/1743/head
yuxuan-lou 2022-10-17 17:51:40 +08:00 committed by Frank Lee
parent f6389d0813
commit 2b49ca80a3
1 changed files with 2 additions and 2 deletions

View File

@ -24,5 +24,5 @@ class LinearWarmupLR(_LRScheduler):
if self.last_epoch < self.warmup_steps:
return [(self.last_epoch + 1) / (self.warmup_steps + 1) * lr for lr in self.base_lrs]
else:
return [(self.total_steps - self.last_epoch) / (self.total_steps - self.warmup_steps) * lr for lr in
self.base_lrs]
return [(self.total_steps - self.last_epoch) / (self.total_steps - self.warmup_steps) * lr
for lr in self.base_lrs]