Giter Site home page Giter Site logo

lanpa / tutorials Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pytorch/tutorials

0.0 2.0 0.0 1.31 GB

PyTorch tutorials.

Home Page: https://pytorch.org/tutorials/

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.20% Python 48.13% Shell 0.63% CSS 0.88% HTML 0.11% JavaScript 3.90% Jupyter Notebook 45.16% CMake 0.07% C++ 0.90% Batchfile 0.01% Dockerfile 0.01%

tutorials's Introduction

PyTorch Tutorials

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

Contributing

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 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 suffix tutorial so that file name is your_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 the index.rst file using a command like .. customcarditem:: beginner/your_tutorial.html. For Recipes, create a thumbnail in the recipes_index.rst

In case you prefer to write your tutorial in jupyter, you can use this 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 using pip install -r requirements.txt

If you want to use virtualenv, make your environment in a venv directory like: virtualenv ./venv, then source ./venv/bin/activate.

  • Then you can build using make docs. This will download the data, execute the tutorials and build the documentation to docs/ 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 running make html-noplot to build basic html documentation to _build/html. This way, you can quickly preview your tutorial.

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

About contributing to PyTorch Documentation and Tutorials

  • You can find information about contributing to PyTorch documentation in the PyTorch Repo README.md file.
  • Additional information can be found in PyTorch CONTRIBUTING.md.

tutorials's People

Contributors

9bow avatar apaszke avatar avinassh avatar brianjo avatar chsasank avatar ericnakagawa avatar ezyang avatar goldsborough avatar guyang3532 avatar inkawhich avatar jeffxtang avatar jerryzh168 avatar jlin27 avatar joelmarcey avatar jspisak avatar kli-casia avatar lara-hdr avatar mrshenli avatar pietern avatar pritamdamania87 avatar rohan-varma avatar sethhweidman avatar soumith avatar ssnl avatar subramen avatar vincentqb avatar winston6 avatar yf225 avatar zhangguanheng66 avatar zou3519 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.