Fix the nan bug when passing all zero values into clip_by_norm_op. (#30777) (#32038)
if all input grads are zero, the output of clip_by_norm will be inf or nan. This pr is used to fix this bug.
Showing
想要评论请 注册 或 登录
if all input grads are zero, the output of clip_by_norm will be inf or nan. This pr is used to fix this bug.