torch.autograd.gradgradcheck
torch.autograd.gradgradcheck(func, inputs, grad_outputs=None, *, eps=1e-06, atol=1e-05, rtol=0.001, gen_non_contig_grad_outputs=False, raise_exception=True, nondet_tol=0.0, check_undefined_grad=True, check_grad_dtypes=False, check_batched_grad=False, check_fwd_over_rev=False, check_rev_over_rev=True, fast_mode=False)
Check gradients of gradients computed via small finite differences
   against analytical gradients w.r.t. tensors in "inputs" and
   "grad_outputs" that are of floating point or complex type and with
   "requires_grad=True".
This function checks that backpropagating through the gradients
   computed to the given "grad_outputs" are correct.
The check between numerical and analytical gradients uses
   "allclose()".
Note:
 The default values are designed for "input" and "grad_outputs" of
 double precision. This check will likely fail if they are of less
 precision, e.g., "FloatTensor".

Warning: