Skip to content

Commit a38b582

Browse files
committedJun 24, 2019
forked from pytorch/tutorials#c4d6e11
1 parent f7bd781 commit a38b582

File tree

225 files changed

+32635
-3350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+32635
-3350
lines changed
 

โ€ŽMakefile

+57-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Minimal makefile for Sphinx documentation
22
#
33

4+
# Locale
5+
export LC_ALL=C
6+
47
# You can set these variables from the command line.
58
SPHINXOPTS =
69
SPHINXBUILD = sphinx-build
710
SPHINXPROJ = PyTorchTutorials
811
SOURCEDIR = .
912
BUILDDIR = _build
13+
DATADIR = _data
1014
GH_PAGES_SOURCES = $(SOURCEDIR) Makefile
1115

1216
# Put it first so that "make" without argument is like "make help".
@@ -18,24 +22,64 @@ help:
1822
# Catch-all target: route all unknown targets to Sphinx using the new
1923
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
2024
%: Makefile
21-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -v
2226

2327
download:
28+
# IMPORTANT NOTE: Please make sure your dataset is downloaded to *_source/data folder,
29+
# otherwise CI might silently break.
30+
31+
# NOTE: Please consider using the Step1 and one of Step2 for new dataset,
32+
# [something] should be replaced with the actual value.
33+
# Step1. DOWNLOAD: wget -N [SOURCE_FILE] -P $(DATADIR)
34+
# Step2-1. UNZIP: unzip -o $(DATADIR)/[SOURCE_FILE] -d [*_source/data/]
35+
# Step2-2. UNTAR: tar -xzf $(DATADIR)/[SOURCE_FILE] -C [*_source/data/]
36+
# Step2-3. AS-IS: cp $(DATADIR)/[SOURCE_FILE] [*_source/data/]
37+
38+
# make data directories
39+
mkdir -p $(DATADIR)
40+
mkdir -p advanced_source/data
41+
mkdir -p beginner_source/data
42+
mkdir -p intermediate_source/data
43+
2444
# transfer learning tutorial data
25-
wget -N https://download.pytorch.org/tutorial/hymenoptera_data.zip
26-
unzip -o hymenoptera_data.zip -d beginner_source
27-
45+
wget -N https://download.pytorch.org/tutorial/hymenoptera_data.zip -P $(DATADIR)
46+
unzip -o $(DATADIR)/hymenoptera_data.zip -d beginner_source/data/
47+
2848
# nlp tutorial data
29-
wget -N https://download.pytorch.org/tutorial/data.zip
30-
unzip -o data.zip -d intermediate_source
31-
49+
wget -N https://download.pytorch.org/tutorial/data.zip -P $(DATADIR)
50+
unzip -o $(DATADIR)/data.zip -d intermediate_source/ # This will unzip all files in data.zip to intermediate_source/data/ folder
51+
3252
# data loader tutorial
33-
wget -N https://download.pytorch.org/tutorial/faces.zip
34-
unzip -o faces.zip -d beginner_source
35-
53+
wget -N https://download.pytorch.org/tutorial/faces.zip -P $(DATADIR)
54+
unzip -o $(DATADIR)/faces.zip -d beginner_source/data/
55+
56+
wget -N https://download.pytorch.org/models/tutorials/4000_checkpoint.tar -P $(DATADIR)
57+
cp $(DATADIR)/4000_checkpoint.tar beginner_source/data/
58+
3659
# neural style images
37-
rm -rf advanced_source/images/
38-
cp -r _static/img/neural-style/ advanced_source/images/
60+
rm -rf advanced_source/data/images/ || true
61+
mkdir -p advanced_source/data/images/
62+
cp -r _static/img/neural-style/ advanced_source/data/images/
63+
64+
# Download dataset for beginner_source/dcgan_faces_tutorial.py
65+
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/img_align_celeba.zip -P $(DATADIR)
66+
unzip -q -o $(DATADIR)/img_align_celeba.zip -d beginner_source/data/celeba
67+
68+
# Download dataset for beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py
69+
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/iris.data -P $(DATADIR)
70+
cp $(DATADIR)/iris.data beginner_source/data/
71+
72+
# Download dataset for beginner_source/chatbot_tutorial.py
73+
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/cornell_movie_dialogs_corpus.zip -P $(DATADIR)
74+
unzip -q -o $(DATADIR)/cornell_movie_dialogs_corpus.zip -d beginner_source/data/
75+
76+
# Download dataset for beginner_source/audio_classifier_tutorial.py
77+
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/UrbanSound8K.tar.gz -P $(DATADIR)
78+
tar -xzf $(DATADIR)/UrbanSound8K.tar.gz -C ./beginner_source/data/
79+
80+
# Download model for beginner_source/fgsm_tutorial.py
81+
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/lenet_mnist_model.pth -P $(DATADIR)
82+
cp $(DATADIR)/lenet_mnist_model.pth ./beginner_source/data/lenet_mnist_model.pth
3983

4084
docs:
4185
make download
@@ -46,6 +90,7 @@ docs:
4690

4791
html-noplot:
4892
$(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html"
93+
bash .jenkins/remove_invisible_code_block_batch.sh "$(BUILDDIR)/html"
4994
@echo
5095
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
5196

โ€ŽREADME.md

+16-49
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,29 @@
1-
# PyTorch ํ•œ๊ตญ์–ด ํŠœํ† ๋ฆฌ์–ผ
1+
# PyTorch Tutorials
22

3-
## ์†Œ๊ฐœ
43

5-
PyTorch์—์„œ ์ œ๊ณตํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์˜ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์„ ์œ„ํ•œ ์ €์žฅ์†Œ์ž…๋‹ˆ๋‹ค.
4+
All the tutorials are now presented as sphinx style documentation at:
65

7-
๋ฒˆ์—ญ์˜ ๊ฒฐ๊ณผ๋ฌผ์€ [http://9bow.github.io/PyTorch-tutorials-kr](http://9bow.github.io/PyTorch-tutorials-kr)์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. (๋ฒˆ์—ญ์„ ์ง„ํ–‰ํ•˜๋ฉฐ **๋ถˆ๊ทœ์น™์ ์œผ๋กœ** ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.)
6+
## [https://pytorch.org/tutorials](https://pytorch.org/tutorials)
87

9-
PyTorch 0.3.1์˜ ํŠœํ† ๋ฆฌ์–ผ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์€ [์ด ๊ณณ](http://9bow.github.io/PyTorch-tutorials-kr-0.3.1)์—์„œ ์ง„ํ–‰๋˜์—ˆ์œผ๋ฉฐ, ํ˜„์žฌ๋Š” ๋ฒˆ์—ญ์ด ์ด๋ค„์ง€๊ณ  ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
108

119

12-
## ์›๋ฌธ
10+
# Contributing
1311

14-
์ด ์ €์žฅ์†Œ์˜ ํŠœํ† ๋ฆฌ์–ผ์€ [์ด ๋ฒ„์ „](https://github.com/pytorch/tutorials/tree/2d092a2f8c5ddfd513d4200bc7c9831d854a938a)์„ ๋ณต์ œํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
12+
We use sphinx-gallery's [notebook styled examples](https://sphinx-gallery.github.io/tutorials/plot_notebook.html#sphx-glr-tutorials-plot-notebook-py) 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.
1513

16-
์ตœ์‹ ์˜ ํŠœํ† ๋ฆฌ์–ผ(์˜์–ด)์€ [PyTorch tutorials repo](https://github.com/pytorch/tutorials)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.
14+
Here's how to create a new tutorial:
15+
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`.
16+
2. Put it in one of the beginner_source, intermediate_source, advanced_source based on the level.
17+
2. Include it in the right TOC tree at index.rst
18+
3. Create a thumbnail in the index file using a command like `.. galleryitem:: beginner/your_tutorial.py`. (This is a custom directive. See `custom_directives.py` for more info.)
1719

20+
In case you prefer to write your tutorial in jupyter, you can use [this script](https://gist.github.com/chsasank/7218ca16f8d022e02a9c0deb94a310fe) 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.
1821

19-
## ๋ชฉ์ฐจ
22+
## Building
2023

21-
(*๋ฒˆ์—ญ์ด ์ง„ํ–‰ ์ค‘์ธ ๋ฌธ์„œ๋“ค์˜ ๋ชฉ์ฐจ์ž…๋‹ˆ๋‹ค.*)
24+
- Start with installing torch, torchvision, and your GPUs latest drivers. Install other requirements using `pip install -r requirements.txt`
2225

23-
### ์ดˆ๊ธ‰ ํŠœํ† ๋ฆฌ์–ผ
24-
* [PyTorch๋กœ ๋”ฅ๋Ÿฌ๋‹ํ•˜๊ธฐ: 60๋ถ„๋งŒ์— ๋์žฅ๋‚ด๊ธฐ](https://9bow.github.io/PyTorch-tutorials-kr/beginner/deep_learning_60min_blitz.html)
25-
* [PyTorch๊ฐ€ ๋ฌด์—‡์ธ๊ฐ€์š”?](https://9bow.github.io/PyTorch-tutorials-kr/beginner/blitz/tensor_tutorial.html)
26-
* [Autograd: ์ž๋™ ๋ฏธ๋ถ„](https://9bow.github.io/PyTorch-tutorials-kr/beginner/blitz/autograd_tutorial.html)
27-
* [์‹ ๊ฒฝ๋ง(Neural Networks)](https://9bow.github.io/PyTorch-tutorials-kr/beginner/blitz/neural_networks_tutorial.html)
28-
* [๋ถ„๋ฅ˜๊ธฐ(Classifier) ํ•™์Šตํ•˜๊ธฐ](https://9bow.github.io/PyTorch-tutorials-kr/beginner/blitz/cifar10_tutorial.html)
29-
* *TBD*
30-
* [Torch ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ PyTorch](https://9bow.github.io/PyTorch-tutorials-kr/beginner/former_torchies_tutorial.html)
31-
* [Tensor](https://9bow.github.io/PyTorch-tutorials-kr/beginner/former_torchies/tensor_tutorial.html)
32-
* [Autograd](https://9bow.github.io/PyTorch-tutorials-kr/beginner/former_torchies/autograd_tutorial.html)
33-
* [nn ํŒจํ‚ค์ง€](https://9bow.github.io/PyTorch-tutorials-kr/beginner/former_torchies/nn_tutorial.html)
34-
* [๋ฉ€ํ‹ฐ-GPU ์˜ˆ์ œ](https://9bow.github.io/PyTorch-tutorials-kr/beginner/former_torchies/parallelism_tutorial.html)
35-
* [์˜ˆ์ œ๋กœ ๋ฐฐ์šฐ๋Š” PyTorch](https://9bow.github.io/PyTorch-tutorials-kr/beginner/pytorch_with_examples.html)
36-
* [Tensor](https://9bow.github.io/PyTorch-tutorials-kr/beginner/pytorch_with_examples.html#tensor)
37-
* [Autograd](https://9bow.github.io/PyTorch-tutorials-kr/beginner/pytorch_with_examples.html#autograd)
38-
* [nn๋ชจ๋“ˆ](https://9bow.github.io/PyTorch-tutorials-kr/beginner/pytorch_with_examples.html#nn)
39-
* [์˜ˆ์ œ ์ฝ”๋“œ](https://9bow.github.io/PyTorch-tutorials-kr/beginner/pytorch_with_examples.html#examples-download)
40-
* [์ „์ดํ•™์Šต(Transfer Learning) ํŠœํ† ๋ฆฌ์–ผ](https://9bow.github.io/PyTorch-tutorials-kr/beginner/transfer_learning_tutorial.html)
41-
* *TBD*
26+
> If you want to use `virtualenv`, make your environment in a `venv` directory like: `virtualenv ./venv`, then `source ./venv/bin/activate`.
4227
43-
### ์ค‘๊ธ‰ ํŠœํ† ๋ฆฌ์–ผ
44-
* [๋ฌธ์ž-๋‹จ์œ„ RNN์œผ๋กœ ์ด๋ฆ„ ๋ถ„๋ฅ˜ํ•˜๊ธฐ](https://9bow.github.io/PyTorch-tutorials-kr/intermediate/char_rnn_classification_tutorial.html)
45-
* [๋ฌธ์ž-๋‹จ์œ„ RNN์œผ๋กœ ์ด๋ฆ„ ์ƒ์„ฑํ•˜๊ธฐ](https://9bow.github.io/PyTorch-tutorials-kr/intermediate/char_rnn_generation_tutorial.html)
46-
* [Sequence to Sequence ๋„คํŠธ์›Œํฌ์™€ Attention์„ ์ด์šฉํ•œ ๋ฒˆ์—ญ](https://9bow.github.io/PyTorch-tutorials-kr/intermediate/seq2seq_translation_tutorial.html)
47-
* [๊ฐ•ํ™” ํ•™์Šต(DQN) ํŠœํ† ๋ฆฌ์–ผ](https://9bow.github.io/PyTorch-tutorials-kr/intermediate/reinforcement_q_learning.html)
48-
* [PyTorch๋กœ ๋ถ„์‚ฐ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœํ•˜๊ธฐ](https://9bow.github.io/PyTorch-tutorials-kr/intermediate/dist_tuto.html)
49-
* [๊ณต๊ฐ„ ๋ณ€ํ˜•๊ธฐ ๋„คํŠธ์›Œํฌ(Spatial Transformer Networks) ํŠœํ† ๋ฆฌ์–ผ](https://9bow.github.io/PyTorch-tutorials-kr/intermediate/spatial_transformer_tutorial.html)
50-
51-
### ๊ณ ๊ธ‰ ํŠœํ† ๋ฆฌ์–ผ
52-
* [PyTorch๋ฅผ ์ด์šฉํ•œ ์‹ ๊ฒฝ๋ง-๋ณ€ํ™˜(Neural-Transfer)](https://9bow.github.io/PyTorch-tutorials-kr/advanced/neural_style_tutorial.html)
53-
* *TBD*
54-
55-
56-
## ์ฐธ์—ฌ
57-
58-
์˜คํƒ€๋‚˜ ์˜ค์—ญ์„ ๋ฐœ๊ฒฌํ•˜์‹œ๋ฉด [์ด์Šˆ](https://github.com/9bow/PyTorch-tutorials-kr/issues/new)๋ฅผ ๋‚จ๊ฒจ์ฃผ์„ธ์š”. [Pull Request](https://github.com/9bow/PyTorch-tutorials-kr/pulls)๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค. :)
59-
60-
61-
---
62-
This is a project to translate [PyTorch tutorials](https://github.com/pytorch/tutorials/tree/e55b6e2f4f99c3d504447f0c151b1f99d2707981) into Korean. For the latest version, please visit to the [PyTorch tutorials repo](https://github.com/pytorch/tutorials).
28+
- 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.
29+
- 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.

0 commit comments

Comments
 (0)
Please sign in to comment.