์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Til
- ์ฑ์งํผํฐ์ ์ ๋ฌด์๋ํ
- Python
- pytorch zero to all
- C++
- ๋น์ ๊ณต์ ๋น ๋ถ๊ธฐ ํฉ๊ฒฉ
- Naive Bayes Classifier for Document Classification
- inplace=True
- sqld
- colab
- ๋ฐ์ดํฐ ์๊ฐํ
- SQLD ๋ฒผ๋ฝ์น๊ธฐ
- ์์ฐ์ด ์ฒ๋ฆฌ์ ๋ชจ๋ ๊ฒ
- ํ์ธํ๋ ๋ฉ๋ชจ๋ฆฌ ํด๊ฒฐ
- interpolate()
- ๋ ผ๋ฌธ์ด๋ก
- ์์ด๋ฆฌํฌ
- llm
- ๋ฐ์ดํฐ ๊ฒฐ์ธก์น
- list
- AI
- DeepSpeed
- sklearn.ensemble
- Collection if
- head()
- BoostCourse
- ์คํ์ ๋ฐฐ์ด ํธ์ํ๊ธฐ
- tail()
- Bag-of-Words
- ์์ฐ์ด ์ฒ๋ฆฌ ๊ธฐ๋ฒ
Archives
- Today
- Total
hyerong's Dev_world๐ก
[pytorch zero to all ๊ฐ์ ๋ด์ฉ ์ ๋ฆฌ] 3๊ฐ gradient descent ๋ณธ๋ฌธ
์นดํ
๊ณ ๋ฆฌ ์์
[pytorch zero to all ๊ฐ์ ๋ด์ฉ ์ ๋ฆฌ] 3๊ฐ gradient descent
hyerong 2024. 1. 14. 15:24
๊ฐ์ ์ฃผ์ : 3๊ฐ Gradient descendent - ๊ฒฝ์ฌ ํ๊ฐ๋ฒ | |
๊ฐ์ ๋ชฉํ : ๊ฒฝ์ฌํ๊ฐ๋ฒ ์๊ณ ๋ฆฌ์ฆ์ ๋ํด ์์๋ณด๊ณ ์์ค์ ์ต์ํํ๋ W๊ฐ์ ์ฐพ๋ ๊ณผ์ ๊ณผ ๋ฐฉ๋ฒ์ ์์๋ณธ๋ค. ๋ํ ๋ฐฉ์ ์์ ์ฌ์ฉํ์ฌ ๊ฐ์ค์น๋ฅผ ์ ๋ฐ์ดํธํ๊ณ ๊ธฐ์ธ๊ธฐ๋ฅผ ๊ณ์ฐํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์ด์ผ๊ธฐํ๋ค. | |
- ๐ฏ The goal of training or learning in machine learning is to find the optimal value of W that minimizes the loss function. - ๐งญ The gradient descent algorithm provides a systematic way to identify the optimal value of W by iteratively updating the weights based on the gradient of the loss function. - ๐ก The algorithm uses the learning rate (alpha) to control the step size of weight updates, and the gradient provides the direction of movement in the loss graph. - ๐งฎ The loss function and gradient can be expressed mathematically, allowing for easy computation and implementation. - ๐ป Implementation steps involve defining the data, initializing weights, defining the forward network, computing the loss and gradient, and updating the weights in each iteration (epoch). - ๐ The algorithm's effectiveness can be observed through the reduction in loss and convergence of the weight value towards the optimal value (true W). - โ Testing the trained system by providing input values and comparing the predicted output to the true values helps validate the effectiveness of the algorithm. |
- ๐ฏ ๊ธฐ๊ณํ์ต์์ ํ๋ จ ๋๋ ํ์ต์ ๋ชฉํ๋ ์์ค ํจ์๋ฅผ ์ต์ํํ๋ ์ต์ ์ W๊ฐ์ ์ฐพ๋ ๊ฒ์ด๋ค. - ๐งญ ๊ฒฝ์ฌ ํ๊ฐ๋ฒ ์๊ณ ๋ฆฌ์ฆ์ ์์ค ํจ์์ ๊ฒฝ์ฌ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๊ฐ์ค์น๋ฅผ ๋ฐ๋ณต์ ์ผ๋ก ์์ ํ์ฌ ์ต์ ์ W๊ฐ์ ์๋ณํ ์ ์๋ ์ฒด๊ณ์ ์ธ ๋ฐฉ๋ฒ์ ์ ๊ณตํ๋ค. - ๐ก ์๊ณ ๋ฆฌ์ฆ์ ํ์ต๋ฅ (์ํ)๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ์ค์น ์ ๋ฐ์ดํธ์ ๋จ๊ณ ํฌ๊ธฐ๋ฅผ ์ ์ดํ๊ณ ๊ธฐ์ธ๊ธฐ๋ ์์ค ๊ทธ๋ํ์์ ์ด๋ ๋ฐฉํฅ์ ์ ๊ณตํ๋ค. - ๐งฎ ์์ค ํจ์์ ๊ธฐ์ธ๊ธฐ๋ฅผ ์ํ์ ์ผ๋ก ํํํ ์ ์์ด ๊ณ์ฐ๊ณผ ๊ตฌํ์ด ์ฉ์ดํ๋ค. - ๐ป ๊ตฌํ ๋จ๊ณ์๋ ๋ฐ์ดํฐ ์ ์, ๊ฐ์ค์น ์ด๊ธฐํ, ์๋ฐฉํฅ ๋คํธ์ํฌ ์ ์, ์์ค ๋ฐ ๊ธฐ์ธ๊ธฐ ๊ณ์ฐ, ๊ฐ ๋ฐ๋ณต(epoch)์ ๊ฐ์ค์น ์ ๋ฐ์ดํธ๊ฐ ํฌํจ๋๋ค. - ๐ ์๊ณ ๋ฆฌ์ฆ์ ํจ์จ์ฑ์ ์์ค ๊ฐ์์ ๊ฐ์ค์น ๊ฐ์ด ์ต์ ์ ๊ฐ(true W)์ผ๋ก ์๋ ด๋๋ ๊ฒ์ ํตํด ๊ด์ฐฐํ ์ ์๋ค. - โ ์ ๋ ฅ ๊ฐ์ ์ ๊ณตํ๊ณ ์์ธก๋ ์ถ๋ ฅ์ ์ค์ ๊ฐ๊ณผ ๋น๊ตํ์ฌ ํ๋ จ๋ ์์คํ ์ ํ ์คํธํ๋ฉด ์๊ณ ๋ฆฌ์ฆ์ ํจ์จ์ฑ์ ๊ฒ์ฆํ๋๋ฐ ๋์์ด ๋๋ค. |
