Unverified Commit 14fe2b67 authored by mcarilli's avatar mcarilli Committed by GitHub
Browse files

Update scaler.py

parent ff6b8bb0
...@@ -45,7 +45,7 @@ class LossScaler(object): ...@@ -45,7 +45,7 @@ class LossScaler(object):
max_loss_scale=2.**24): max_loss_scale=2.**24):
if loss_scale == "dynamic": if loss_scale == "dynamic":
self.dynamic = True self.dynamic = True
self._loss_scale = init_scale self._loss_scale = min(max_loss_scale, init_scale)
else: else:
self.dynamic = False self.dynamic = False
self._loss_scale = loss_scale self._loss_scale = loss_scale
......
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