While exploring stochastic gradient descent in Chapter 3, we treated the computation of gradients of the loss function 𝛻xL(x) as a black box. In this chapter, we open the black box and cover the theory and practice of automatic differentiation, as well as explore PyTorch’s Autograd module that implements the same. Automatic differentiation is a mature method that allows for the effortless and efficient computation of gradients of arbitrarily complicated loss functions. This is critical when ...
4. Automatic Differentiation in Deep Learning
Get Deep Learning with Python: Learn Best Practices of Deep Learning Models with PyTorch now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.