Unverified Commit 6fe0edb8 authored by Chunyang Wen's avatar Chunyang Wen Committed by GitHub
Browse files

remove redundant init code (#234)


Co-authored-by: default avatarShaden Smith <Shaden.Smith@microsoft.com>
Co-authored-by: default avatarJeff Rasley <jerasley@microsoft.com>
parent a2b75527
...@@ -141,15 +141,6 @@ class DynamicLossScaler: ...@@ -141,15 +141,6 @@ class DynamicLossScaler:
# `overflow` is boolean indicating whether the gradient overflowed # `overflow` is boolean indicating whether the gradient overflowed
def update_scale(self, overflow): def update_scale(self, overflow):
if not hasattr(self, 'min_scale'):
self.min_scale = 1
if not hasattr(self, 'delayed_shift'):
self.delayed_shift = 1
if not hasattr(self, 'cur_hysteresis'):
self.cur_hysteresis = 1
if not hasattr(self, 'consecutive_hysteresis'):
self.consecutive_hysteresis = True
if overflow: if overflow:
# self.cur_scale /= self.scale_factor # self.cur_scale /= self.scale_factor
if self.delayed_shift == 1 or self.cur_hysteresis == 1: if self.delayed_shift == 1 or self.cur_hysteresis == 1:
......
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