Skip to content

Commit

Permalink
Fix advanced_source/cpp.export.rst typo (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohkingtaek authored Aug 25, 2024
1 parent 9384e7a commit 0e6d581
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions advanced_source/cpp_export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Python์€ ๋™์ ์„ฑ๊ณผ ์‹ ์†ํ•œ ์ดํ„ฐ๋ ˆ์ด์…˜์ด ํ•„์š”ํ•œ ์ƒํ™ฉ์— ์ ํ•ฉ
<https://pytorch.org/docs/master/jit.html>`_ ๋Š” PyTorch ๋ชจ๋ธ์„ Python์—์„œ
C++๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๊ฒƒ์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค. TorchScript๋Š” TorchScript ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ์ดํ•ดํ•˜๊ณ , ์ปดํŒŒ์ผํ•˜๊ณ ,
์ง๋ ฌํ™”ํ•  ์ˆ˜ ์žˆ๋Š” PyTorch ๋ชจ๋ธ์˜ ํ•œ ํ‘œํ˜„๋ฐฉ์‹์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๊ธฐ๋ณธ์ ์ธ "์ฆ‰์‹œ ์‹คํ–‰"[์—ญ์ž ์ฃผ: eager execution]
API๋ฅผ ์‚ฌ์šฉํ•ด ์ž‘์„ฑ๋œ PyTorch ๋ชจ๋ธ์ด ์žˆ๋‹ค๋ฉด, ์ฒ˜์Œ์œผ๋กœ ํ•ด์•ผํ•  ์ผ์€ ์ด ๋ชจ๋ธ์„ TorchScriptย ๋ชจ๋ธ๋กœ ๋ณ€ํ™˜ํ•˜๋Š”
API๋ฅผ ์‚ฌ์šฉํ•ด ์ž‘์„ฑ๋œ PyTorch ๋ชจ๋ธ์ด ์žˆ๋‹ค๋ฉด, ์ฒ˜์Œ์œผ๋กœ ํ•ด์•ผ ํ•  ์ผ์€ ์ด ๋ชจ๋ธ์„ TorchScriptย ๋ชจ๋ธ๋กœ ๋ณ€ํ™˜ํ•˜๋Š”
๊ฒƒ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜์— ์„ค๋ช…๋˜์–ด ์žˆ๋“ฏ์ด, ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ์— ์ด ๊ณผ์ •์€ ๋งค์šฐ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฏธ TorchScript ๋ชจ๋“ˆ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๋ฉด,
์ด ์„น์…˜์„ ๊ฑด๋„ˆ๋›ฐ์–ด๋„ ์ข‹์Šต๋‹ˆ๋‹ค.

Expand Down Expand Up @@ -268,7 +268,7 @@ page <https://pytorch.org/>`_ ๋กœ๋ถ€ํ„ฐ ๋ฐ›์œผ์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ€์žฅ ์ตœ
[100%] Built target example-app
์ด์ œ trace๋œ ``ResNet18`` ๋ชจ๋ธ์ธ ``traced_resnet_model.pt`` ๊ฒฝ๋กœ๋ฅผ ``example-app`` ๋ฐ”์ด๋„ˆ๋ฆฌ์—
์ž…๋ ฅํ–ˆ๋‹ค๋ฉด, "ok" ๋ฉ”์‹œ์ง€๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ์ด ์˜ˆ์ œ์— ``my_module_model.pt`` ๋ฅผ
์ž…๋ ฅํ–ˆ๋‹ค๋ฉด, "ok" ๋ฉ”์‹œ์ง€๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์ด ์˜ˆ์ œ์— ``my_module_model.pt`` ๋ฅผ
์ธ์ž๋กœ ๋„˜๊ฒผ๋‹ค๋ฉด, ์ž…๋ ฅ๊ฐ’์ด ํ˜ธํ™˜๋˜์ง€ ์•Š๋Š” ๋ชจ์–‘์ด๋ผ๋Š” ์—๋Ÿฌ๋ฉ”์‹œ์ง€๊ฐ€ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค. ``my_module_model.pt`` ๋Š”
4D๊ฐ€ ์•„๋‹Œ 1D ํ…์„œ๋ฅผ ๋ฐ›๋„๋ก ๋˜์–ด์žˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.
Expand Down Expand Up @@ -307,7 +307,7 @@ C++ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ``main()`` ํ•จ์ˆ˜์— ์•„๋ž˜์˜ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฒ 
๋งˆ์ง€๋ง‰ ์ค„์—์„œ ์ถœ๋ ฅ๊ฐ’์˜ ์ฒซ ๋‹ค์„ฏ ๊ฐ’๋“ค์„ ํ”„๋ฆฐํŠธํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฒˆ ํŠœํ† ๋ฆฌ์–ผ์˜ ์•ž๋ถ€๋ถ„์—์„œ Python ๋ชจ๋ธ์— ๋™์ผํ•œ
์ž…๋ ฅ๊ฐ’์„ ๋„˜๊ฒจ์ฃผ์—ˆ๊ธฐ ๋•Œ๋ฌธ์—, ์ด ๋ถ€๋ถ„์—์„œ๋„ ์ถœ๋ ฅ๊ฐ’์€ ๊ฐ™์„ ๊ฒƒ์ด๋ผ๊ณ  ์˜ˆ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿผ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„
๋‹ค์‹œ ์ปดํŒŒ์ผํ•˜๊ณ  ๊ฐ™์€ ์ง๋ ฌํ™”๋œ ๋ชจ๋ธ์— ๋Œ€ํ•ด ์‹คํ–‰ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค:
๋‹ค์‹œ ์ปดํŒŒ์ผํ•˜๊ณ  ๊ฐ™์€ ์ง๋ ฌํ™”๋œ ๋ชจ๋ธ์— ๋Œ€ํ•ด ์‹คํ–‰ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค:
.. code-block:: sh
Expand Down

0 comments on commit 0e6d581

Please sign in to comment.