pytorch/tutorials là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 9.3k sao, viết chủ yếu bằng Python. PyTorch tutorials.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
All the tutorials are now presented as sphinx style documentation at:
https://pytorch.org/tutorials
Asking a question
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.
Submitting an issue
You can submit the following types of issues:
Feature request - request a new tutorial to be added. Please explain why this tutorial is needed and how it demonstrates PyTorch value.
Bug report - report a failure or outdated information in an existing tutorial. When submitting a bug report, please run: python3 -m torch.utils.collect_env to get information about your environment and add the output to the bug report.
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 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.
Create a Python file. If you want it executed while inserted into documentation, save the file with the suffix tutorial so that the file name is your_tutorial.py.
Put it in one of the beginner_source, intermediate_source, advanced_source directory based on the level of difficulty. If it is a recipe, add it to recipes_source. For tutorials demonstrating unstable prototype features, add to the prototype_source.
For Tutorials (except if it is a prototype feature), include it in the toctree directive and create a customcarditem in index.rst.
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
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.
Building locally
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:
Install required dependencies by running: pip install -r requirements.txt.
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.
If you have a GPU-powered laptop, you can build using make docs. This will download the data, execute the tutorials and build the documentation to docs/ directory. This might 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.
Building a single tutorial
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
The GALLERY_PATTERN variable respects regular expressions.
Spell Check
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)
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.
License
PyTorch Tutorials is BSD licensed, as found in the LICENSE file.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/pytorch/tutorials là nguồn chính thức.
pytorch/tutorials có bao nhiêu sao?
pytorch/tutorials có 9.3k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/pytorch/tutorials. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
pytorch/tutorials có phải mã nguồn mở không?
Có — pytorch/tutorials phát hành theo license BSD-3-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/pytorch/tutorials.
pytorch/tutorials còn đang phát triển không?
Commit gần nhất trên pytorch/tutorials là 18 ngày trước (theo timestamp GitHub). Repo có 4.4k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
pytorch/tutorials dùng license gì?
pytorch/tutorials phát hành theo license BSD-3-Clause. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
pytorch/tutorials là gì?
pytorch/tutorials (pytorch/tutorials) là dự án Python trên GitHub. Theo mô tả gốc: PyTorch tutorials.
pytorch/tutorials viết bằng ngôn ngữ gì?
pytorch/tutorials chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về tutorials?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về tutorials.