neon.backends.autodiff.GradUtil.is_invalid

static GradUtil.is_invalid(grad_op_tree, be)[source]

Test if the result of grad_op_tree contains Nan, inf, -inf, or abnormally large or small numbers. Only for debug purpose.

Parameters:
Returns:

Whether the result contains Nan, inf, -inf, or abnormally

large or small numbers

Return type:

bool