Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion beginner_source/examples_nn/polynomial_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-----------
A third order polynomial, trained to predict :math:`y=\sin(x)` from :math:`-\pi`
to :math:`pi` by minimizing squared Euclidean distance.
to :math:`\pi` by minimizing squared Euclidean distance.
This implementation uses the nn package from PyTorch to build the network.
PyTorch autograd makes it easy to define computational graphs and take gradients,
Expand Down
2 changes: 1 addition & 1 deletion beginner_source/examples_nn/polynomial_optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--------------

A third order polynomial, trained to predict :math:`y=\sin(x)` from :math:`-\pi`
to :math:`pi` by minimizing squared Euclidean distance.
to :math:`\pi` by minimizing squared Euclidean distance.

This implementation uses the nn package from PyTorch to build the network.

Expand Down
2 changes: 1 addition & 1 deletion beginner_source/examples_tensor/polynomial_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--------------
A third order polynomial, trained to predict :math:`y=\sin(x)` from :math:`-\pi`
to :math:`pi` by minimizing squared Euclidean distance.
to :math:`\pi` by minimizing squared Euclidean distance.
This implementation uses numpy to manually compute the forward pass, loss, and
backward pass.
Expand Down
2 changes: 1 addition & 1 deletion beginner_source/examples_tensor/polynomial_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----------------

A third order polynomial, trained to predict :math:`y=\sin(x)` from :math:`-\pi`
to :math:`pi` by minimizing squared Euclidean distance.
to :math:`\pi` by minimizing squared Euclidean distance.

This implementation uses PyTorch tensors to manually compute the forward pass,
loss, and backward pass.
Expand Down
13 changes: 9 additions & 4 deletions beginner_source/pytorch_with_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ between the network output and the true output.
You can browse the individual examples at the
:ref:`end of this page <examples-download>`.

To run the tutorials below, make sure you have the `torch`_
and `numpy`_ packages installed.

.. _torch: https://github.com/pytorch/pytorch
.. _numpy: https://github.com/numpy/numpy

.. contents:: Table of Contents
:local:

Expand Down Expand Up @@ -217,6 +223,8 @@ We can easily implement this model as a Module subclass:
.. includenodoc:: /beginner/examples_nn/dynamic_net.py




.. _examples-download:

Examples
Expand All @@ -229,7 +237,6 @@ Tensors

.. toctree::
:maxdepth: 2
:hidden:

/beginner/examples_tensor/polynomial_numpy
/beginner/examples_tensor/polynomial_tensor
Expand All @@ -247,7 +254,6 @@ Autograd

.. toctree::
:maxdepth: 2
:hidden:

/beginner/examples_autograd/polynomial_autograd
/beginner/examples_autograd/polynomial_custom_function
Expand All @@ -266,7 +272,6 @@ Autograd

.. toctree::
:maxdepth: 2
:hidden:

/beginner/examples_nn/polynomial_nn
/beginner/examples_nn/polynomial_optim
Expand All @@ -284,4 +289,4 @@ Autograd

.. raw:: html

<div style='clear:both'></div>
<div style='clear:both'></div>