torch.autograd.GradcheckOptions
export interface GradcheckOptions {
/**
* Perturbation magnitude for finite differences.
* @default 1e-6
*/
eps?: number;
/**
* Absolute tolerance for comparison.
* @default 1e-5
*/
atol?: number;
/**
* Relative tolerance for comparison.
* @default 1e-3
*/
rtol?: number;
/**
* Whether to raise an error on mismatch or just return false.
* @default true
*/
raise_exception?: boolean;
/**
* Whether to check gradients for inputs that don't require grad.
* @default false
*/
check_undefined_grad?: boolean;
}eps(number)optional- – Perturbation magnitude for finite differences.
atol(number)optional- – Absolute tolerance for comparison.
rtol(number)optional- – Relative tolerance for comparison.
raise_exception(boolean)optional- – Whether to raise an error on mismatch or just return false.
check_undefined_grad(boolean)optional- – Whether to check gradients for inputs that don't require grad.
Options for gradient checking.