Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
9bow committed Jun 27, 2021
1 parent 20dca6c commit d1dadbf
Show file tree
Hide file tree
Showing 79 changed files with 3,214 additions and 1,101 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/0_FIX_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: ๋ฒˆ์—ญ๋œ ๋ฌธ์„œ์— ์ˆ˜์ •/๋ณ€๊ฒฝ์ด ํ•„์š”ํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•˜์‹ค ๋•Œ
---

## ๋ฌธ์„œ URL
_์ˆ˜์ •์ด ํ•„์š”ํ•œ URL์„ ๋‚จ๊ฒจ์ฃผ์„ธ์š”. (์˜ˆ. https://tutorials.pytorch.kr/beginner/pytorch_with_examples.html)_
_์ˆ˜์ •์ด ํ•„์š”ํ•œ URL์„ ๋‚จ๊ฒจ์ฃผ์„ธ์š”. (์˜ˆ. https://tutorials.pytorch.kr/beginner/basics/intro.html)_
- **URL**:

## ๋ณ€๊ฒฝ ์‚ฌํ•ญ
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/1_TRANSLATE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ _๋ฒˆ์—ญ์„ ํ•˜์‹ค / ์š”์ฒญํ•˜์‹ค URL์„ ๋‚จ๊ฒจ์ฃผ์„ธ์š”. (์˜ˆ. https://tutorials
## (๋Œ€๋žต์ ์ธ) ์˜ˆ์ƒ ์™„๋ฃŒ ์ผ์ •
_์˜ˆ์ƒํ•˜์‹œ๋Š” ์™„๋ฃŒ ์ผ์ •์ด ์žˆ์œผ์‹œ๋‹ค๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”. (์˜ˆ. 1๋‹ฌ ๋‚ด, 12์›” ์ค‘ ๋“ฑ)_<br />
_(๋ฐ˜๋“œ์‹œ ์ง€ํ‚ค์…”์•ผ ํ•˜๋Š” ์ผ์ •์ด ์•„๋‹™๋‹ˆ๋‹ค - ์ผ์ •์ด ๋„ˆ๋ฌด ๋Šฆ์–ด์งˆ ๊ฒฝ์šฐ ๋‹ค๋ฅธ ๋ฒˆ์—ญ์ž๋ฅผ ์œ„ํ•ด ๋‚จ๊ฒจ์ฃผ์„ธ์š”.)_
* ์˜ˆ์ƒ ์™„๋ฃŒ ์ผ์ •:

## ๊ด€๋ จ ์ด์Šˆ
_ํ˜„์žฌ ๋ฒˆ์—ญ ์š”์ฒญ / ์ง„ํ–‰ ๋‚ด์—ญ์„ ๋ณด๊ธฐ ์œ„ํ•ด ๊ฐ ๋ฒ„์ „์˜ ๋ฉ”์ธ ์ด์Šˆ๋ฅผ ์ฐธ์กฐํ•ฉ๋‹ˆ๋‹ค._ <br />
_(ํŠน๋ณ„ํ•œ ์ผ์ด ์—†๋‹ค๋ฉด ์ˆ˜์ •ํ•˜์ง€ ์•Š์œผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค.)_
#210 (v1.8)
_(ํŠน๋ณ„ํ•œ ์ผ์ด ์—†๋‹ค๋ฉด ๋ณ€๊ฒฝํ•˜์ง€ ์•Š์œผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค.)_
* ๊ด€๋ จ ์ด์Šˆ: #221 (v1.9)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

PyTorch์—์„œ ์ œ๊ณตํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์˜ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์„ ์œ„ํ•œ ์ €์žฅ์†Œ์ž…๋‹ˆ๋‹ค.\
๋ฒˆ์—ญ์˜ ๊ฒฐ๊ณผ๋ฌผ์€ [https://tutorials.pytorch.kr](https://tutorials.pytorch.kr)์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. (๋ฒˆ์—ญ์„ ์ง„ํ–‰ํ•˜๋ฉฐ **๋ถˆ๊ทœ์น™์ ์œผ๋กœ** ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.)\
ํ˜„์žฌ ๋ฒˆ์—ญ ์ง„ํ–‰ ์ค‘์ธ ๋‚ด์šฉ์€ [#210 ์ด์Šˆ](https://github.com/9bow/PyTorch-tutorials-kr/issues/210)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.
ํ˜„์žฌ ๋ฒˆ์—ญ ์ง„ํ–‰ ์ค‘์ธ ๋‚ด์šฉ์€ [#221 ์ด์Šˆ](https://github.com/9bow/PyTorch-tutorials-kr/issues/221)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

## ๊ธฐ์—ฌํ•˜๊ธฐ

Expand All @@ -22,7 +22,7 @@ PyTorch์—์„œ ์ œ๊ณตํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์˜ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์„ ์œ„ํ•œ ์ €์žฅ์†Œ

## ์›๋ฌธ

ํ˜„์žฌ PyTorch v1.8.1 ํŠœํ† ๋ฆฌ์–ผ ๋ฒˆ์—ญ์ด ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค. ([pytorch/tutorials@e0938fb](https://github.com/pytorch/tutorials/commit/e0938fbd1faca724ee0448f6553f606c68b099e3) ๊ธฐ์ค€)
ํ˜„์žฌ PyTorch v1.9 ํŠœํ† ๋ฆฌ์–ผ ๋ฒˆ์—ญ์ด ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค. ([pytorch/tutorials@24ad87f](https://github.com/pytorch/tutorials/commit/24ad87fdb9e5cd73ed8a27eed1efed6c4a7a1bb5) ๊ธฐ์ค€)

์ตœ์‹  ๋ฒ„์ „์˜ ํŠœํ† ๋ฆฌ์–ผ(๊ณต์‹, ์˜์–ด)์€ [PyTorch tutorials ์‚ฌ์ดํŠธ](https://pytorch.org/tutorials) ๋ฐ [PyTorch tutorials ์ €์žฅ์†Œ](https://github.com/pytorch/tutorials)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

Expand All @@ -46,5 +46,5 @@ v1.0 ์ดํ›„ ๋ฒˆ์—ญ์€ ๋ณ„๋„ ์ €์žฅ์†Œ๋กœ ๊ด€๋ฆฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. [์ด ์ €์žฅ
| 0.3.1 | [PyTorch-tutorials-kr-0.3.1](https://9bow.github.io/PyTorch-tutorials-kr-0.3.1) | [GitHub ์ €์žฅ์†Œ](https://github.com/9bow/PyTorch-tutorials-kr-0.3.1) |

---
This is a project to translate [pytorch/tutorials@e0938fb](https://github.com/pytorch/tutorials/commit/e0938fbd1faca724ee0448f6553f606c68b099e3) into Korean.
This is a project to translate [pytorch/tutorials@24ad87f](https://github.com/pytorch/tutorials/commit/24ad87fdb9e5cd73ed8a27eed1efed6c4a7a1bb5) into Korean.
For the latest version, please visit to the [official PyTorch tutorials repo](https://github.com/pytorch/tutorials).
80 changes: 80 additions & 0 deletions _static/images/microsoft-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/perf_viz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_callstack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_distributed_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_kernel_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_memory_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_operator_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_overview1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_overview2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_trace_view1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_trace_view2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_views_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/tensorboard_pr_curves.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/trace_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 39 additions & 1 deletion _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

{% block footer %}
{{ super() }}

<script>
//add microsoft link

if(window.location.href.indexOf("/beginner/basics/")!= -1)
{
var url="https://docs.microsoft.com/learn/paths/pytorch-fundamentals/?wt.mc_id=aiml-7486-cxa";
switch(window.location.pathname.split("/").pop().replace('.html',''))
{
case"quickstart_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/9-quickstart?WT.mc_id=aiml-7486-cxa";
break;
case"tensorqs_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/2-tensors?WT.mc_id=aiml-7486-cxa";
break;
case"data_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/3-data?WT.mc_id=aiml-7486-cxa";
break;
case"transforms_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/4-transforms?WT.mc_id=aiml-7486-cxa";
break;
case"buildmodel_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/5-model?WT.mc_id=aiml-7486-cxa";
break;
case"autogradqs_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/6-autograd?WT.mc_id=aiml-7486-cxa";
break;
case"optimization_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/7-optimization?WT.mc_id=aiml-7486-cxa";
break;
case"saveloadrun_tutorial":
url="https://docs.microsoft.com/learn/modules/intro-machine-learning-pytorch/8-inference?WT.mc_id=aiml-7486-cxa";
}

$(".pytorch-call-to-action-links").children().first().before("<a href="+url+' data-behavior="call-to-action-event" data-response="Run in Microsoft Learn" target="_blank"><div id="microsoft-learn-link" style="padding-bottom: 0.625rem;border-bottom: 1px solid #f3f4f7;padding-right: 2.5rem;display: -webkit-box; display: -ms-flexbox; isplay: flex; -webkit-box-align: center;-ms-flex-align: center;align-items: center;"><img class="call-to-action-img" src="../../_static/images/microsoft-logo.svg"/><div class="call-to-action-desktop-view">Run in Microsoft Learn</div><div class="call-to-action-mobile-view">Learn</div></div></a>')
}
</script>

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-71919972-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
Expand Down Expand Up @@ -42,7 +80,7 @@
</script>

<script type="text/javascript">
var collapsedSections = ['PyTorch Recipes', 'Image and Video', 'Audio', 'Text', 'Reinforcement Learning', 'Deploying PyTorch Models in Production', 'Code Transforms with FX', 'Frontend APIs', 'Extending PyTorch', 'Model Optimization', 'Parallel and Distributed Training', 'Mobile'];
var collapsedSections = ['ํŒŒ์ดํ† ์น˜(PyTorch) ๋ ˆ์‹œํ”ผ', 'ํŒŒ์ดํ† ์น˜(PyTorch) ๋ฐฐ์šฐ๊ธฐ', '์ด๋ฏธ์ง€/๋น„๋””์˜ค', '์˜ค๋””์˜ค', 'ํ…์ŠคํŠธ', '๊ฐ•ํ™”ํ•™์Šต', 'PyTorch ๋ชจ๋ธ์„ ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์— ๋ฐฐํฌํ•˜๊ธฐ', 'Code Transforms with FX', 'ํ”„๋ก ํŠธ์—”๋“œ API', 'PyTorch ํ™•์žฅํ•˜๊ธฐ', '๋ชจ๋ธ ์ตœ์ ํ™”', '๋ณ‘๋ ฌ ๋ฐ ๋ถ„์‚ฐ ํ•™์Šต', 'Mobile'];
</script>

{% endblock %}
3 changes: 2 additions & 1 deletion advanced_source/cpp_export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ TorchScript๋กœ ๋ฐ”๋กœ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ๋ฐ”๋žŒ์งํ•œ ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
์•„์ง TorchScript์—์„œ ์ง€์›ํ•˜์ง€ ์•Š๋Š” Python ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ๋ฉ”์†Œ๋“œ๋“ค์„ ์—ฌ๋Ÿฌ๋ถ„์˜ ``nn.Module``
์—์„œ ์ œ์™ธํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด, ๊ทธ ๋ฉ”์†Œ๋“œ๋“ค์„ ``@torch.jit.ignore`` ๋กœ ์–ด๋…ธํ…Œ์ดํŠธํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

``sm`` ์€ ์ง๋ ฌํ™”(serialization) ์ค€๋น„๊ฐ€ ๋œ ``ScriptModule`` ์˜ ์ธ์Šคํ„ด์Šค์ž…๋‹ˆ๋‹ค.

๋‹จ๊ณ„ 2. Script ๋ชจ๋“ˆ์„ ํŒŒ์ผ๋กœ ์ง๋ ฌํ™”ํ•˜๊ธฐ
-------------------------------------------------
Expand All @@ -119,7 +120,7 @@ TorchScript๋กœ ๋ฐ”๋กœ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ๋ฐ”๋žŒ์งํ•œ ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
traced_script_module.save("traced_resnet_model.pt")

์ด ํ•จ์ˆ˜๋Š” ``traced_resnet_model.pt`` ํŒŒ์ผ์„ ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ์— ์ƒ์„ฑํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์–ด๋…ธํ…Œ์ด์…˜ ์˜ˆ์‹œ์˜
``my_module`` ๋ฅผ ์ง๋ ฌํ™”ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด, ``my_module.save("my_module_model.pt")`` ๋ฅผ
``sm`` ์„ ์ง๋ ฌํ™”ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด, ``sm.save("my_module_model.pt")`` ๋ฅผ
ํ˜ธ์ถœํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ด๋กœ์จ ์šฐ๋ฆฌ๋Š” ์ด์ œ Python์˜ ์„ธ๊ณ„์—์„œ ๋ฒ—์–ด๋‚˜ C++ ํ™˜๊ฒฝ์—์„œ ์ž‘์—…ํ•  ์ค€๋น„๋ฅผ ๋งˆ์ณค์Šต๋‹ˆ๋‹ค.

๋‹จ๊ณ„ 3. C++์—์„œ Script ๋ชจ๋“ˆ ๋กœ๋”ฉํ•˜๊ธฐ
Expand Down
2 changes: 1 addition & 1 deletion advanced_source/cpp_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class citizens of PyTorch::
@staticmethod
def backward(ctx, grad_h, grad_cell):
outputs = lltm_cpp.backward(
grad_h.contiguous(), grad_cell.contiguous(), *ctx.saved_variables)
grad_h.contiguous(), grad_cell.contiguous(), *ctx.saved_tensors)
d_old_h, d_input, d_weights, d_bias, d_old_cell = outputs
return d_input, d_weights, d_bias, d_old_h, d_old_cell

Expand Down
Loading

0 comments on commit d1dadbf

Please sign in to comment.