Warm up lr more slowly

This commit is contained in:
Daniel Povey 2023-05-18 15:03:44 +08:00
parent 76e6726178
commit e4a774cb98

View File

@ -882,7 +882,7 @@ class Eden(LRScheduler):
warmup_factor = (
1.0
if self.batch >= self.warmup_batches
else 0.5 + 0.5 * (self.batch / self.warmup_batches)
else 0.1 + 0.9 * (self.batch / self.warmup_batches)
)
return [x * factor * warmup_factor for x in self.base_lrs]