Skip to content

Commit

Permalink
Allow warmup rates < 10. (awslabs#556)
Browse files Browse the repository at this point in the history
* Fix: learning rate warmups < 10.
  • Loading branch information
tdomhan authored Oct 9, 2018
1 parent 8fe92d2 commit 1c544ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sockeye/lr_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, warmup: int = 0) -> None:
self.base_lr = None # Note: will be overwritten by MXNet optimizer
check_condition(warmup >= 0, "warmup needs to be >= 0.")
self.warmup = warmup
self.log_warmup_every_t = self.warmup // 10
self.log_warmup_every_t = max(self.warmup // 10, 1)
self.last_warmup_log = -1

def __call__(self, num_updates):
Expand Down

0 comments on commit 1c544ac

Please sign in to comment.