1# -*- coding: utf-8 -*- 2# Copyright (c) Meta Platforms, Inc. and affiliates. 3# All rights reserved. 4# 5# This source code is licensed under the BSD-style license found in the 6# LICENSE file in the root directory of this source tree. 7 8""" 9Template Tutorial 10================= 11 12**Author:** `FirstName LastName <https://github.com/username>`_ 13 14.. grid:: 2 15 16 .. grid-item-card:: :octicon:`mortar-board;1em;` What you will learn 17 18 * Item 1 19 * Item 2 20 * Item 3 21 22 .. grid-item-card:: :octicon:`list-unordered;1em;` Prerequisites 23 24 * PyTorch v2.0.0 25 * GPU ??? 26 * Other items 3 27 28If you have a video, add it here like this: 29 30.. raw:: html 31 32 <div style="margin-top:10px; margin-bottom:10px;"> 33 <iframe width="560" height="315" src="https://www.youtube.com/embed/IC0_FRiX-sw" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 34 </div> 35 36To test your tutorial locally, you can do one of the following: 37 38* You can control specific files that generate the results by using 39 ``GALLERY_PATTERN`` environment variable. The GALLERY_PATTERN variable 40 respects regular expressions. 41 For example to run only ``neural_style_transfer_tutorial.py``, 42 use the following command: 43 44 .. code-block:: sh 45 46 GALLERY_PATTERN="neural_style_transfer_tutorial.py" make html 47 48 or 49 50 .. code-block:: sh 51 52 GALLERY_PATTERN="neural_style_transfer_tutorial.py" sphinx-build . _build 53 54* Make a copy of this repository and add only your 55 tutorial to the `beginner_source` directory removing all other tutorials. 56 Then run ``make html``. 57 58Verify that all outputs were generated correctly in the created HTML. 59""" 60 61######################################################################### 62# Overview 63# -------- 64# 65# Describe Why is this topic important? Add Links to relevant research papers. 66# 67# This tutorial walks you through the process of.... 68# 69# Steps 70# ----- 71# 72# Example code (the output below is generated automatically): 73# 74 75import torch 76 77x = torch.rand(5, 3) 78print(x) 79 80###################################################################### 81# (Optional) Additional Exercises 82# ------------------------------- 83# 84# Add additional practice exercises for users to test their knowledge. 85# Example: `NLP from Scratch <https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html#exercises>`__. 86# 87 88###################################################################### 89# Conclusion 90# ---------- 91# 92 93# Summarize the steps and concepts covered. Highlight key takeaways. 94# 95# Further Reading 96# --------------- 97# 98# * Link1 99# * Link2 100