1
0
mirror of https://github.com/hpcaitech/ColossalAI.git synced 2025-05-03 14:08:11 +00:00

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

This commit is contained in:
yuxuan-lou 2022-10-17 17:51:40 +08:00 committed by Frank Lee
parent f6389d0813
commit 2b49ca80a3

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]