Primer on Gradients

Learn about gradients and PyTorch's autograd API.

Implementing explanation methods requires basic knowledge of gradients. So before diving deeper into the course, let’s first quickly review the concepts of gradients.

Gradients

Given a function f(x)f(x), where x=(x1,x2,...xd)x = (x_1, x_2, ... x_d) is a dd-dimensional vector, the gradient of f(x)f(x) with respect to xx, i.e., xf(x)\nabla_x f(x), is a dd-dimensional vector given by

Get hands-on with 1400+ tech skills courses.