message: Improve error message reporting for check_numerics gradient.
  At present the op message is only printed if the numeric check fails during
  the op's 'forward' computation. If the check fails during the gradient, there is no
  identifier on *which* op's gradient failed.
  This is the Python equivalent of
diff: @@ -489,10 +489,12 @@ def _GatherNdGrad(op, grad):
  @ops.RegisterGradient("CheckNumerics")
  -def _CheckNumericsGrad(_, grad):
  +def _CheckNumericsGrad(op, grad):
  """Gradient for check_numerics op."""
  return array_ops.check_numerics(
  - grad, "Not a number (NaN) or infinity (Inf) values detected in gradient.")
  + grad,
  + "Not a number (NaN) or infinity (Inf) values detected in gradient. %s" %
  + op.get_attr("message"))
  @ops.RegisterGradient("PlaceholderWithDefault")
  