Skip to content

PyTorch Autograd Engine

Sameer Deshmukh edited this page Nov 2, 2019 · 3 revisions

This article summarizes the architecture of AutoGrad Engine of PyTorch.

  • torch.Tensor

  • torch.autograd.Function

  • torch.autograd.gradcheck

  • torch.autograd.gradgradcheck

  • torch.autograd.profiler

A neural network or a graph has multiple nodes. Each node is a tensor. A tensor/node is called a leaf if it has enable_grad set to false.

Autograd autogeneration

A lot of the backward differentiation functions are generated automatically via the gen_autograd_functions.py file.