| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
All the tutorials are now presented as sphinx style documentation at:
If you have a question about a tutorial, post in https://dev-discuss.pytorch.org/ rather than creating an issue in this repo. Your question will be answered much faster on the dev-discuss forum.
You can submit the following types of issues:
We use sphinx-gallery's notebook styled examples to create the tutorials. Syntax is very simple. In essence, you write a slightly well formatted Python file and it shows up as an HTML page. In addition, a Jupyter notebook is autogenerated and available to run in Google Colab.
Here is how you can create a new tutorial (for a detailed description, see CONTRIBUTING.md):
NOTE: Before submitting a new tutorial, read PyTorch Tutorial Submission Policy.
If you are starting off with a Jupyter notebook, you can use this script to convert the notebook to Python file. After conversion and addition to the project, please make sure that section headings and other things are in logical order.
The tutorial build is very large and requires a GPU. If your machine does not have a GPU device, you can preview your HTML build without actually downloading the data and running the tutorial code:
Typically, you would run either in conda or virtualenv. If you want to use virtualenv, in the root of the repo, run: virtualenv venv, then source venv/bin/activate.
You can build a single tutorial by using the GALLERY_PATTERN environment variable. For example to run only neural_style_transfer_tutorial.py, run:
GALLERY_PATTERN="neural_style_transfer_tutorial.py" make html
or
GALLERY_PATTERN="neural_style_transfer_tutorial.py" sphinx-build . _build
The GALLERY_PATTERN variable respects regular expressions.
You can run pyspelling to check for spelling errors in the tutorials. To check only Python files, run pyspelling -n python. To check only .rst files, use pyspelling -n reST. Currently, .rst spell checking is limited to the beginner/ directory. Contributions to enable spell checking in other directories are welcome!
pyspelling # full check (~3 mins) pyspelling -n python # Python files only pyspelling -n reST # reST files (only beginner/ dir currently included)
PyTorch Tutorials is BSD licensed, as found in the LICENSE file.
| Back | FazBrowse Home | New Git URL |