Commit fc7693ad authored by lukovnikov's avatar lukovnikov
Browse files

schedule fix

parent 20686b78
...@@ -54,7 +54,7 @@ class LRSchedule(object): ...@@ -54,7 +54,7 @@ class LRSchedule(object):
""" """
if self.t_total < 0: if self.t_total < 0:
return 1. return 1.
progress = step / self.t_total progress = float(step) / self.t_total
ret = self.get_lr_(progress) ret = self.get_lr_(progress)
# warning for exceeding t_total (only active with warmup_linear # warning for exceeding t_total (only active with warmup_linear
if not nowarn and self.warn_t_total and progress > 1. and progress > self.warned_for_t_total_at_progress: if not nowarn and self.warn_t_total and progress > 1. and progress > self.warned_for_t_total_at_progress:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment