torch.autograd.gradgradcheck
function gradgradcheck(fn: (...inputs: Tensor[]) => Tensor, inputs: Tensor[], options: GradcheckOptions = {}): Promise<boolean>A faster but less accurate gradient check using forward-mode differentiation.
Uses the same interface as gradcheck but may be faster for functions with many outputs and few inputs.
Parameters
inputsTensor[]- Input tensors
optionsGradcheckOptionsoptional- Gradient checking options
Returns
Promise<boolean>– Promise resolving to true if gradients match