提交 27101d3d 编写于 作者: H HydrogenSulfate

fix bug for warmup_steps setting

上级 0c0cc5e9
......@@ -56,9 +56,8 @@ class LRBase(object):
self.step_each_epoch = step_each_epoch
self.learning_rate = learning_rate
self.warmup_epoch = warmup_epoch
self.warmup_steps = round(
self.warmup_epoch *
self.step_each_epoch) if by_epoch else self.warmup_epoch
self.warmup_steps = self.warmup_epoch if by_epoch else round(
self.warmup_epoch * self.step_each_epoch)
self.warmup_start_lr = warmup_start_lr
self.last_epoch = last_epoch
self.by_epoch = by_epoch
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册