TensorPlay
Reference guides
Copy
View MarkdownDownload .md

Automatic differentiation package - tensorplay.autograd

Automatic differentiation package - torch.autograd

tensorplay._C._autograd.backward

tensorplay.autograd.grad

Compute and return the sum of gradients of outputs with respect to the inputs.

Functional higher level API

tensorplay.autograd.functional.jacobian

Compute the Jacobian of a given function.

tensorplay.autograd.functional.hessian

Compute the Hessian of a given scalar function.

tensorplay.autograd.functional.vjp

Compute the dot product between a vector v and the Jacobian of the given function at the point given by the inputs.

tensorplay.autograd.functional.jvp

Compute the dot product between the Jacobian of the given function at the point given by the inputs and a vector v.

tensorplay.autograd.functional.vhp

Compute the dot product between vector v and Hessian of a given scalar function at a specified point.

tensorplay.autograd.functional.hvp

Compute the dot product between the scalar function's Hessian and a vector v at a specified point.

Function

tensorplay.autograd.function.Function

Records operation history and defines formulas for differentiating ops.

tensorplay.autograd.backward

tensorplay.autograd.jvp

Compute the dot product between the Jacobian of the given function at the point given by the inputs and a vector v.

Custom Function utilities

tensorplay.autograd.function.once_differentiable

Decorator to make a custom autograd Function's backward run once, with gradients detached and grad-mode disabled inside.

Numerical gradient checking

tensorplay.autograd.gradcheck.gradcheck

Check gradients computed via small finite differences against analytical gradients wrt tensors in inputs that are of floating point or complex type and with requires_grad=True.

tensorplay.autograd.gradcheck.gradgradcheck

Check gradients of gradients computed via small finite differences against analytical gradients wrt tensors in inputs and grad_outputs that are of floating point or complex type and with requires_grad=True.

tensorplay.autograd.gradcheck.GradcheckError

Error raised by gradcheck() and gradgradcheck().

tensorplay.autograd.gradcheck.get_analytical_jacobian

tensorplay.autograd.gradcheck.get_numerical_jacobian

Compute the numerical Jacobian for a given fn and its inputs.

tensorplay.autograd.gradcheck.get_numerical_jacobian_wrt_specific_input

Debugging and anomaly detection

tensorplay.autograd.anomaly_mode.detect_anomaly

Context-manager that enables anomaly detection for the autograd engine.

tensorplay.autograd.anomaly_mode.set_detect_anomaly

Context-manager that sets the anomaly detection for the autograd engine on or off.

Ask DeepWiki