Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions beginner_source/examples_autograd/polynomial_autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down