Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PyTorch tutorials.

License

NotificationsYou must be signed in to change notification settings

JimmyJim1/tutorials

 
 

Repository files navigation

All the tutorials are now presented as sphinx style documentation at:

Contributing

We use sphinx-gallery'snotebook 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 documentation page.

Here's how to create a new tutorial or recipe:

  1. Create a notebook styled python file. If you want it executed while inserted into documentation, save the file with suffixtutorial so that file name isyour_tutorial.py.
  2. Put it in one of the beginner_source, intermediate_source, advanced_source based on the level. If it is a recipe, add to recipes_source.
  3. For Tutorials (except if it is a prototype feature), include it in the TOC tree at index.rst
  4. For Tutorials (except if it is a prototype feature), create a thumbnail in theindex.rst file using a command like.. customcarditem:: beginner/your_tutorial.html. For Recipes, create a thumbnail in therecipes_index.rst

In case you prefer to write your tutorial in jupyter, you can usethis script to convert the notebook to python file. After conversion and addition to the project, please make sure the sections headings etc are in logical order.

Building

  • Start with installing torch, torchvision, and your GPUs latest drivers. Install other requirements usingpip install -r requirements.txt

If you want to usevirtualenv, make your environment in avenv directory like:virtualenv ./venv, thensource ./venv/bin/activate.

  • Then you can build usingmake docs. This will download the data, execute the tutorials and build the documentation todocs/ directory. This will take about 60-120 min for systems with GPUs. If you do not have a GPU installed on your system, then see next step.
  • You can skip the computationally intensive graph generation by runningmake html-noplot to build basic html documentation to_build/html. This way, you can quickly preview your tutorial.

If you getModuleNotFoundError: No module named 'pytorch_sphinx_theme' make: *** [html-noplot] Error 2, from /tutorials/src/pytorch-sphinx-theme runpython setup.py install.

About contributing to PyTorch Documentation and Tutorials

  • You can find information about contributing to PyTorch documentation in thePyTorch RepoREADME.md file.
  • Additional information can be found inPyTorch CONTRIBUTING.md.

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook47.4%
  • Python45.7%
  • JavaScript4.1%
  • C++0.9%
  • CSS0.9%
  • Shell0.6%
  • Other0.4%

[8]ページ先頭

©2009-2025 Movatter.jp