forked from mindspore-Ecosystem/mindspore
!6430 fix sparse loss scale
Merge pull request !6430 from riemann_penn/fix_sparse_loss_scale
This commit is contained in:
commit
cd88f58b88
|
@ -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"""
|
||||
|
|
Loading…
Reference in New Issue