Skip to content

Commit

Permalink
fix cosine lr sched for t_mult=1 with warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeib authored and myleott committed Sep 3, 2018
1 parent 0a7f9e6 commit dfd7771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fairseq/optim/lr_scheduler/cosine_lr_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def step_update(self, num_updates):
else:
i = math.floor(curr_updates / self.period)
t_i = self.period
t_curr = num_updates - (self.period * i)
t_curr = curr_updates - (self.period * i)

lr_shrink = self.lr_shrink ** i
min_lr = self.min_lr * lr_shrink
Expand Down

0 comments on commit dfd7771

Please sign in to comment.