"tests/vscode:/vscode.git/clone" did not exist on "9e57b994ca27738c019c798294b581fc8fdc8722"
Commit 2063287b authored by Michael Carilli's avatar Michael Carilli
Browse files

Using temporary Python-side inf+nan check in amp/scaler.py

parent ae921de2
...@@ -36,7 +36,8 @@ class LossScaler(object): ...@@ -36,7 +36,8 @@ class LossScaler(object):
if p.grad is not None: if p.grad is not None:
self._has_overflow = scale_check_overflow(p.grad.data, self._has_overflow = scale_check_overflow(p.grad.data,
1. / scale) 1. / scale)
if self._has_overflow: break if self._has_overflow:
break
# if self._overflow_buf.any(): # if self._overflow_buf.any():
if self._has_overflow: if self._has_overflow:
......
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