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