!6430 fix sparse loss scale

Merge pull request !6430 from riemann_penn/fix_sparse_loss_scale
This commit is contained in:
mindspore-ci-bot 2020-09-18 09:02:01 +08:00 committed by Gitee
commit cd88f58b88
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ grad_overflow = P.FloatStatus()
def _tensor_grad_overflow(grad):
return grad_overflow(grad)
@_grad_overflow.register("RowTensor")
def _tensor_grad_overflow_row_tensor(grad):
return grad_overflow(grad.values)
class DynamicLossScaleUpdateCell(Cell):
r"""