diff --git a/beginner_source/examples_autograd/polynomial_autograd.py b/beginner_source/examples_autograd/polynomial_autograd.py index d33ca8bcb90..abbda9a420e 100755 --- a/beginner_source/examples_autograd/polynomial_autograd.py +++ b/beginner_source/examples_autograd/polynomial_autograd.py @@ -2,8 +2,9 @@ PyTorch: Tensors and autograd ------------------------------- -A third order polynomial, trained to predict :math:`y=\sin(x)` from :math:`-\pi` -to :math:`\pi` by minimizing squared Euclidean distance. +A third order polynomial, trained to predict :math:`y=e^x` from :math:`-1` +to :math:`1` by minimizing squared Euclidean distance. The exponential function +can be approximated by its Taylor expansion: :math:`e^x \approx 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \ldots` This implementation computes the forward pass using operations on PyTorch Tensors, and uses PyTorch autograd to compute gradients.