Skip to content

fixing translations#623

Merged
9bow merged 2 commits into
masterfrom
feature/fixing_autogradsavedtensorshooks
Dec 30, 2022
Merged

fixing translations#623
9bow merged 2 commits into
masterfrom
feature/fixing_autogradsavedtensorshooks

Conversation

@hyoyoung
Copy link
Copy Markdown
Member

๋ผ์ด์„ ์Šค ๋™์˜

๋ณ€๊ฒฝํ•ด์ฃผ์‹œ๋Š” ๋‚ด์šฉ์— BSD 3ํ•ญ ๋ผ์ด์„ ์Šค๊ฐ€ ์ ์šฉ๋จ์„ ๋™์˜ํ•ด์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋” ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๊ธฐ์—ฌํ•˜๊ธฐ ๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

๋™์˜ํ•˜์‹œ๋ฉด ์•„๋ž˜ [ ]๋ฅผ [x]๋กœ ๋งŒ๋“ค์–ด์ฃผ์„ธ์š”.

  • ๊ธฐ์—ฌํ•˜๊ธฐ ๋ฌธ์„œ๋ฅผ ํ™•์ธํ•˜์˜€์œผ๋ฉฐ, ๋ณธ PR ๋‚ด์šฉ์— BSD 3ํ•ญ ๋ผ์ด์„ ์Šค๊ฐ€ ์ ์šฉ๋จ์— ๋™์˜ํ•ฉ๋‹ˆ๋‹ค.

๊ด€๋ จ ์ด์Šˆ ๋ฒˆํ˜ธ

์ด Pull Request์™€ ๊ด€๋ จ์žˆ๋Š” ์ด์Šˆ ๋ฒˆํ˜ธ๋ฅผ ์ ์–ด์ฃผ์„ธ์š”.

์ด์Šˆ ๋˜๋Š” PR ๋ฒˆํ˜ธ ์•ž์— #์„ ๋ถ™์ด์‹œ๋ฉด ์ œ๋ชฉ์„ ๋ฐ”๋กœ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. (์˜ˆ. #999 )

PR ์ข…๋ฅ˜

์ด PR์— ํ•ด๋‹น๋˜๋Š” ์ข…๋ฅ˜ ์•ž์˜ [ ]์„ [x]๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.

  • ์˜คํƒˆ์ž๋ฅผ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ๋ฒˆ์—ญ์„ ๊ฐœ์„ ํ•˜๋Š” ๊ธฐ์—ฌ
  • ๋ฒˆ์—ญ๋˜์ง€ ์•Š์€ ํŠœํ† ๋ฆฌ์–ผ์„ ๋ฒˆ์—ญํ•˜๋Š” ๊ธฐ์—ฌ
  • ๊ณต์‹ ํŠœํ† ๋ฆฌ์–ผ ๋‚ด์šฉ์„ ๋ฐ˜์˜ํ•˜๋Š” ๊ธฐ์—ฌ
  • ์œ„ ์ข…๋ฅ˜์— ํฌํ•จ๋˜์ง€ ์•Š๋Š” ๊ธฐ์—ฌ

PR ์„ค๋ช…

์ด PR๋กœ ๋ฌด์—‡์ด ๋‹ฌ๋ผ์ง€๋Š”์ง€ ๋Œ€๋žต์ ์œผ๋กœ ์•Œ๋ ค์ฃผ์„ธ์š”.
์šฉ์–ด์ง‘์— ๋งž๊ฒŒ ๋‹ค๋“ฌ๊ณ , ๋ฒˆ์—ญ์„ ์กฐ๊ธˆ ๋งค๋„๋Ÿฝ๊ฒŒ ๋ฐ”๊พธ์—ˆ์Šต๋‹ˆ๋‹ค

Copy link
Copy Markdown
Member

@9bow 9bow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ชจ๋“  ๋ฌธ์žฅ๋“ค์„ ์‚ดํŽด๋ณด์ง€๋Š” ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฒˆ์—ญ์ด ๋งค๋„๋Ÿฝ์ง€ ์•Š๊ฑฐ๋‚˜ ๋‚ด์šฉ์ด ์ด์–ด์ง€์ง€ ์•Š๋Š” ๋ฌธ์žฅ๋“ค ๋ช‡ ๊ฐœ๋ฅผ ์‚ดํŽด๋ดค๋Š”๋ฐ ์›๋ฌธ๊ณผ ๋น„๊ตํ•ด๋ณด๋ฉด ์—ฌ๋Ÿฌ ์ด์ƒํ•œ ๋ถ€๋ถ„๋“ค์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค;

๊ธฐ์กด ๋ฒˆ์—ญ๋“ค์ด ์›๋ฌธ์„ ๋”ฐ๋ฅด์ง€ ์•Š์€ ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์•„์„œ, ์šฐ์„  ๋ˆˆ์— ๋ณด์ด๋Š” ๋ถ€๋ถ„ ์œ„์ฃผ๋กœ ์ˆ˜์ •ํ•˜๊ณ  (์ด ๋ฌธ์„œ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋‹ค๋ฅธ ๋ฌธ์„œ๋“ค๋„) ์ „์ฒด์ ์œผ๋กœ ์‚ดํŽด๋ณด๋Š” ๊ธฐํšŒ๋ฅผ ๋‚˜์ค‘์— ๋‹ค์‹œ ๊ฐ€์ ธ๋ณด๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.


######################################################################
# ๋‹จ์ˆœํ•œ ๋ฒ„์ „์˜ ์•„๋งˆ ์ด๋Ÿด๊ฒƒ์ž…๋‹ˆ๋‹ค.
# ๋ชจ์ž๋ž€ ๋ฒ„์ „์€ ๋ณดํ†ต ์ด๋Ÿด๊ฒƒ์ž…๋‹ˆ๋‹ค.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋‹จ์ˆœํ•œ๊ณผ ๋ชจ์ž๋ž€ ์‚ฌ์ด์˜ ์–ด๋”˜๊ฐ€์ฏค์ผ๊ฑฐ ๊ฐ™์€๋ฐ, naive version์„ ์˜†์— ๋ช…์‹œํ•ด์ฃผ๋Š”๊ฑด ์–ด๋–จ๊นŒ์š”?

# ํŒจํ‚น/์–ธํŒจํ‚น ์ ˆ์ฐจ๋ฅผ ์ œ์–ดํ•˜๋Š” hooks์„ ์ •์˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค.

# ์ด ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์—ญ์ „ํŒŒ๊ฐ€ ์ด๋ก ์ƒ์—์„œ ์ž‘๋™ํ•˜๋Š” ๋ฐฉ์‹์— ์ต์ˆ™ํ•˜๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค. ์•„๋‹ˆ๋ผ๋ฉด, ์•„๋ž˜์˜ ์ž๋ฃŒ๋ฅผ ๋จผ์ € ์ฝ์–ด๋ณด์„ธ์š”.
# ์ด ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์—ญ์ „ํŒŒ๊ฐ€ ์ด๋ก ์ƒ์—์„œ ์ž‘๋™ํ•˜๋Š” ๋ฐฉ์‹์— ์ต์ˆ™ํ•˜๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์›๋ฌธ์ด This tutorial assumes you are familiar with how backpropagation works in theory.์ธ๋ฐ์š”,

์ด ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ๋…์ž๊ฐ€ ์—ญ์ „ํŒŒ๊ฐ€ ์–ด๋–ป๊ฒŒ ๋™์ž‘ํ•˜๋Š”์ง€๋ฅผ ์ด๋ก ์ ์œผ๋กœ (์ž˜) ์•Œ๊ณ  ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค. ์ •๋„๋Š” ์–ด๋–จ๊นŒ์š”?

# ์ด ํŠœํ† ๋ฆฌ์–ผ์˜ ๋ชฉํ‘œ ์ค‘ ํ•˜๋‚˜๋Š” ์ด๋Ÿฐ ๋‚ด์šฉ์„ ์ดํ•ด์™€ ๋ฏธ์„ธ ์กฐ์ •์„ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
#
# ์‚ฌ์‹ค, ์ด ๊ทธ๋ž˜ํ”„ ์ž์ฒด๋กœ๋Š” ๊ฐ€๋”์€ ๊ทธ๋‹ค์ง€ ๋งŽ์€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์ง„ ์•Š์Šต๋‹ˆ๋‹ค. ์—ฌํƒ€์˜ ํ…์„œ๋“ค์„ ๋ณต์ œํ•˜์ง€ ์•Š๋Š” ๊ฒƒ ์ฒ˜๋Ÿผ์š”.
# ์‚ฌ์‹ค, ๊ฐ€๋”์”ฉ ๊ณ„์‚ฐ ๊ทธ๋ž˜ํ”„ ๊ทธ ์ž์ฒด๋กœ๋Š” ๋ณต์ œ ๋˜์ง€ ์•Š์€ ๋‹ค๋ฅธ tensor์ฒ˜๋Ÿผ ๋งŽ์€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์›๋ฌธ์ด ์•„๋ž˜์™€ ๊ฐ™์€ ์‹์ธ๋ฐ์š”, ์šฉ์–ด์ง‘์—๋Š” ์—†์ง€๋งŒ computational graph๋ฅผ ์—ฐ์‚ฐ ๊ทธ๋ž˜ํ”„๋กœ ๋ฒˆ์—ญํ•˜๊ณ  ์žˆ์–ด์„œ, ์•„๋ž˜์™€ ๊ฐ™์€ ์‹์€ ์–ด๋–จ๊นŒ์š”?

In fact, the graph in itself sometimes does not consume much more memory as it never copies any tensors.

Suggested change
# ์‚ฌ์‹ค, ๊ฐ€๋”์”ฉ ๊ณ„์‚ฐ ๊ทธ๋ž˜ํ”„ ๊ทธ ์ž์ฒด๋กœ๋Š” ๋ณต์ œ ๋˜์ง€ ์•Š์€ ๋‹ค๋ฅธ tensor์ฒ˜๋Ÿผ ๋งŽ์€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.
# ์‹ค์ œ๋กœ ๋•Œ๋•Œ๋กœ (์—ฐ์‚ฐ) ๊ทธ๋ž˜ํ”„ ์ž์ฒด๋Š” tensor๋“ค์„ ์ „ํ˜€ ๋ณต์ œํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋งŽ์€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์†Œ๋ชจํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.
Comment on lines +30 to +31
# ๊ทธ๋Ÿฌ๋‚˜, ๊ทธ๋ž˜ํ”„๋Š” *์ฐธ์กฐ* ๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
# ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚œ ํ…์„œ๋ฅผ : **์ €์žฅ๋œ ํ…์„œ** ๋ผ๊ณ  ๋ช…๋ช…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
# ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚œ tensor๋ฅผ : **์ €์žฅ๋œ tensor** ๋ผ๊ณ  ๋ช…๋ช…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์›๋ฌธ์˜ ํ•œ ๋ฌธ์žฅ์„ ์ชผ๊ฐ  ๊ฒƒ์œผ๋กœ ๋ณด์ด๋Š”๋ฐ์š”, ์ด์ „ ๋ฌธ์žฅ๊ณผ ํ•จ๊ป˜ ๋ด๋„ saved tensor์— ๋Œ€ํ•œ ๊ฐœ๋…์ด ์ž˜ ์ „๋‹ฌ๋˜์ง€ ์•Š๋Š” ๊ฒƒ ๊ฐ™์•„์„œ ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

However, the graph can keep references to tensors that would otherwise have gone out of scope: those are referred to as saved tensors.

๋Œ€๋žต ์•„๋ž˜์™€ ๊ฐ™์€ ์ •๋„๋Š” ์–ด๋–จ๊นŒ์š”?

ํ•˜์ง€๋งŒ, ๊ทธ๋ž˜ํ”„๋Š” ๋ฒ”์œ„์—์„œ ๋ฒ—์–ด๋‚œ tensor๋“ค์— ๋Œ€ํ•œ *์ฐธ์กฐ(reference)* ๋Š” ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค : ์ด๋Ÿฌํ•œ tensor๋“ค์„ **์ €์žฅ๋œ tensor(saved tensor)** ๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

@hyoyoung hyoyoung requested a review from 9bow December 12, 2022 11:52
Copy link
Copy Markdown
Member

@9bow 9bow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘

@9bow 9bow merged commit 17718eb into master Dec 30, 2022
@hyoyoung hyoyoung deleted the feature/fixing_autogradsavedtensorshooks branch November 25, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants