Skip to content

Commit

Permalink
Merge pull request pytorch#974 from pytorch/jlin27_tutorials_refresh
Browse files Browse the repository at this point in the history
Add updates for new recipes. Does not contain new tutorials main page yet.
  • Loading branch information
Jessica Lin authored May 4, 2020
2 parents f557ee0 + 104a4f8 commit 11fa3df
Show file tree
Hide file tree
Showing 123 changed files with 8,987 additions and 106 deletions.
8 changes: 4 additions & 4 deletions .jenkins/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then

# Step 4: If any of the generated files are not related the tutorial files we want to run,
# then we remove them
for filename in $(find docs/beginner docs/intermediate docs/advanced -name '*.html'); do
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.html'); do
file_basename=$(basename $filename .html)
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
rm $filename
fi
done
for filename in $(find docs/beginner docs/intermediate docs/advanced -name '*.rst'); do
for filename in $(find docs/beginner docs/intermediate docs/advanced docs/recipes -name '*.rst'); do
file_basename=$(basename $filename .rst)
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
rm $filename
Expand All @@ -118,13 +118,13 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
rm $filename
fi
done
for filename in $(find docs/_sources/beginner docs/_sources/intermediate docs/_sources/advanced -name '*.rst.txt'); do
for filename in $(find docs/_sources/beginner docs/_sources/intermediate docs/_sources/advanced docs/_sources/recipes -name '*.rst.txt'); do
file_basename=$(basename $filename .rst.txt)
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
rm $filename
fi
done
for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced -name '*.doctree'); do
for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced docs/.doctrees/recipes -name '*.doctree'); do
file_basename=$(basename $filename .doctree)
if [[ ! " ${FILES_TO_RUN[@]} " =~ " ${file_basename} " ]]; then
rm $filename
Expand Down
Binary file added _static/img/thumbnails/cropped/60-min-blitz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/thumbnails/cropped/DCGAN-Tutorial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Binary file added _static/img/thumbnails/cropped/loading-data.PNG
Binary file added _static/img/thumbnails/cropped/torch-nn.png
File renamed without changes.
367 changes: 367 additions & 0 deletions recipes/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,367 @@
:orphan:



.. _sphx_glr_recipes:

Recipes
------------------
1. recipes/* and recipes_index.rst
PyTorch Recipes
https://pytorch.org/tutorials/recipes/recipes_index.html




.. raw:: html

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



.. _sphx_glr_recipes_recipes:

PyTorch Recipes
---------------------------------------------
1. loading_data_recipe.py
Loading Data in PyTorch
https://pytorch.org/tutorials/recipes/recipes/loading_data_recipe.html

2. defining_a_neural_network.py
Defining a Neural Network in PyTorch
https://pytorch.org/tutorials/recipes/recipes/defining_a_neural_network.html

3. what_is_state_dict.py
What is a state_dict in PyTorch
https://pytorch.org/tutorials/recipes/recipes/what_is_state_dict.html

4. saving_and_loading_models_for_inference.py
Saving and loading models for inference in PyTorch
https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_models_for_inference.html

5. custom_dataset_transforms_loader.py
Developing Custom PyTorch Dataloaders
https://pytorch.org/tutorials/recipes/recipes/custom_dataset_transforms_loader.html


6. Captum_Recipe.py
Model Interpretability using Captum
https://pytorch.org/tutorials/recipes/recipes/Captum_Recipe.html

7. dynamic_quantization.py
Dynamic Quantization
https://pytorch.org/tutorials/recipes/recipes/dynamic_quantization.html

8. save_load_across_devices.py
Saving and loading models across devices in PyTorch
https://pytorch.org/tutorials/recipes/recipes/save_load_across_devices.html

9. saving_and_loading_a_general_checkpoint.py
Saving and loading a general checkpoint in PyTorch
https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_a_general_checkpoint.html

10. saving_and_loading_models_for_inference.py
Saving and loading models for inference in PyTorch
https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_models_for_inference.html

11. saving_multiple_models_in_one_file.py
Saving and loading multiple models in one file using PyTorch
https://pytorch.org/tutorials/recipes/recipes/saving_multiple_models_in_one_file.html

12. warmstarting_model_using_parameters_from_a_different_model.py
Warmstarting models using parameters from different model
https://pytorch.org/tutorials/recipes/recipes/warmstarting_model_using_parameters_from_a_different_model.html

13. zeroing_out_gradients.py
Zeroing out gradients
https://pytorch.org/tutorials/recipes/recipes/zeroing_out_gradients.html



.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Installation ---------------------- PyTorch should be installed to log models and metrics into ...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_tensorboard_with_pytorch_thumb.png

:ref:`sphx_glr_recipes_recipes_tensorboard_with_pytorch.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/tensorboard_with_pytorch

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ Saving the model’s ``state_dict`` with the ``torch.save()`` function ...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_saving_and_loading_models_for_inference_thumb.png

:ref:`sphx_glr_recipes_recipes_saving_and_loading_models_for_inference.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/saving_and_loading_models_for_inference

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ A ``state_dict`` is an integral entity if you are interested in savin...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_what_is_state_dict_thumb.png

:ref:`sphx_glr_recipes_recipes_what_is_state_dict.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/what_is_state_dict

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ To save multiple checkpoints, you must organize them in a dictionary ...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_saving_and_loading_a_general_checkpoint_thumb.png

:ref:`sphx_glr_recipes_recipes_saving_and_loading_a_general_checkpoint.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/saving_and_loading_a_general_checkpoint

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ Whether you are loading from a partial ``state_dict``, which is missi...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_warmstarting_model_using_parameters_from_a_different_model_thumb.png

:ref:`sphx_glr_recipes_recipes_warmstarting_model_using_parameters_from_a_different_model.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/warmstarting_model_using_parameters_from_a_different_model

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ At the heart of PyTorch data loading utility is the `torch.utils.data...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_loading_data_recipe_thumb.png

:ref:`sphx_glr_recipes_recipes_loading_data_recipe.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/loading_data_recipe

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="There may be instances where you want to save and load your neural networks across different de...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_save_load_across_devices_thumb.png

:ref:`sphx_glr_recipes_recipes_save_load_across_devices.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/save_load_across_devices

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ When saving a model comprised of multiple ``torch.nn.Modules``, such ...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_saving_multiple_models_in_one_file_thumb.png

:ref:`sphx_glr_recipes_recipes_saving_multiple_models_in_one_file.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/saving_multiple_models_in_one_file

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ PyTorch provides the elegantly designed modules and classes, includin...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_defining_a_neural_network_thumb.png

:ref:`sphx_glr_recipes_recipes_defining_a_neural_network.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/defining_a_neural_network

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Introduction ------------ When training your neural network, models are able to increase their ...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_zeroing_out_gradients_thumb.png

:ref:`sphx_glr_recipes_recipes_zeroing_out_gradients.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/zeroing_out_gradients

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="--------------">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_dynamic_quantization_thumb.png

:ref:`sphx_glr_recipes_recipes_dynamic_quantization.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/dynamic_quantization

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Model Interpretability using Captum">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_Captum_Recipe_thumb.png

:ref:`sphx_glr_recipes_recipes_Captum_Recipe.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/Captum_Recipe

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="A significant amount of the effort applied to developing machine learning algorithms is related...">

.. only:: html

.. figure:: /recipes/recipes/images/thumb/sphx_glr_custom_dataset_transforms_loader_thumb.png

:ref:`sphx_glr_recipes_recipes_custom_dataset_transforms_loader.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/recipes/recipes/custom_dataset_transforms_loader
.. raw:: html

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



.. only :: html
.. container:: sphx-glr-footer
:class: sphx-glr-footer-gallery
.. container:: sphx-glr-download
:download:`Download all examples in Python source code: recipes_python.zip <//Users/jplin/github/tutorials/recipes/recipes_python.zip>`
.. container:: sphx-glr-download
:download:`Download all examples in Jupyter notebooks: recipes_jupyter.zip <//Users/jplin/github/tutorials/recipes/recipes_jupyter.zip>`
.. only:: html

.. rst-class:: sphx-glr-signature

`Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
Loading

0 comments on commit 11fa3df

Please sign in to comment.