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 (#1716)
This commit is contained in:
parent
f6389d0813
commit
2b49ca80a3
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user