๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ
-
Gradient descentAI\ML\DL/Deep learning theory 2023. 5. 6. 21:34
Gradient descent๋ loss function ์ ์ต์๋ก ํ๋ ๊ฐ์ค์น๋ฅผ ์ฐพ๋ ๋ฐฉ๋ฒ์ด๋ค. ์๋ฅผ๋ค์ด loss function์ด $y=x^{2}$ ๋ผ๋ 2์ฐจํจ์๋ผ๊ณ ํ์. ์ด๋ ์์คํจ์๊ฐ ์ต์๊ฐ์ ๊ฐ๊ฒ ํ๋ ์ ์ x=0 ์ด๋ผ๋ ํฌ์ธํธ์ด๋ค. 0์ด๋ผ๋ ์์น๋ฅผ ์ฐพ๊ธฐ ์ํด์๋ ์ด๋ป๊ฒ ํด์ผํ ๊น? ์ฐ์ ์ฒ์์ ์์์ ์ ์ ์ฐ์ด์ ๊ทธ ์ ์ ์ ์ ์ ๋ฐ์ดํธํด๋๊ฐ๋ฉด์ ์ต์์ ์ผ๋ก ํ๊ทํด์ผํ๋ค. ์ด๋, ์ต์๊ฐ์ ๊ฐ๋ ์ ์ผ๋ก ๋ค๊ฐ๊ฐ๊ธฐ ์ํด์ ๊ธฐ์ธ๊ธฐ๋ฅผ ์ด์ฉํ ์ ์๋ค. ์๋ํ๋ฉด ํน์ ์ ์์์ ๊ธฐ์ธ๊ธฐ๋ ํจ์์ ๊ฐ์ฅ ๊ฐํ๋ฅธ ๋ฐฉํฅ์ ํฅํ๊ณ ์ด ๊ฐ์ฅ ๊ฐํ๋ฅธ ๋ฐฉํฅ์ ๋ฐ๋๋ฐฉํฅ์ผ๋ก ์ด๋ํ๋ฉด ์ต์๊ฐ์ผ๋ก ํฅํ ์ ์๊ธฐ ๋๋ฌธ์ด๋ค. ์ฒ์ ์์น๊ฐ $x=1$ ์ด๋ผ๊ณ ํ๋ฉด ์ด ์์น์์์ ๊ธฐ์ธ๊ธฐ๋ $y^{'}(1)=2$ ์ด๋๊น $1-2=-2$ ์ ๊ฒฐ..
-
์ค์นผ๋ผ, ๋ฒกํฐ๋ฅผ ํ๋ ฌ๋ก ๋ฏธ๋ถMathematics/Linear algebra 2023. 5. 3. 19:04
1. ์ค์นผ๋ผ๋ฅผ ํ๋ ฌ๋ก ๋ฏธ๋ถ ์ด ๊ฒฝ์ฐ๋ ํ๋ ฌ์ด ์ ๋ ฅ์ด๊ณ , ์ถ๋ ฅ๋๋ ํจ์๊ฐ ์ค์นผ๋ผ์ผ๋ ์ ์ฉ ๊ฐ๋ฅํ๋ค. $$\textbf{x}=\left [ \begin{matrix} x_{11} & x_{12} \\ x_{21} & x_{22} \\ \end{matrix} \right ]$$ $$d\textbf{x}=\left [ \begin{matrix} dx_{11} & dx_{12} \\ dx_{21} & dx_{22} \\ \end{matrix} \right ]$$ ์ฌ๊ธฐ์์ $f$ ๋ผ๋ ์ค์นผ๋ผ ํจ์๋ฅผ ํ๋ ฌ $\textbf{x}$๋ก ๋ฏธ๋ถํ๊ณ ์ ํ๋ค. ์ํ๋ ๋ฏธ๋ถ๊ฐ์ ์ป์ผ๋ ค๋ฉด ์๊ฐ๋ณํ์จ $\\df$๋ฅผ $ d\textbf{x}=\left [ \begin{matrix} dx_{11} & dx_{12} \\ dx_{21} &..
-
๋ค๋ณ์ ํจ์์ ๋ฏธ๋ถMathematics/Linear algebra 2023. 5. 3. 00:30
1. ํธ๋ํจ์ ์ผ๋ณ์ ํจ์ $f: โ \rightarrow โ$ ์ ๋ํจ์ $f' (x) $ ์ ๋ค์๊ณผ ๊ฐ์ด ์ ์ํ๋ค. $ f' (x)= \displaystyle \lim_{h \to 0}\frac{f(x+h)-f(x)}{h} $ ์ผ๋ณ์ ํจ์ $f $ ์ ๋ํจ์ $f' $ ์ ์ $x$์์ '$x$ ๊ฐ ๋ณํ ๋ ํจ์ $f $์ ์๊ฐ๋ณํ์จ' ์ด๋ค. ๋ค๋ณ์ ํจ์ $f$ ์ ๋ํจ์๋ ๊ฐ $x_{i} (i=1, \ldots , n)$ ์ ๋ํ ์๊ฐ๋ณํ์จ๋ก ์ ์๋๋ค. ์ด์ ๊ฐ์ด ๊ฐ $x_{i} (i=1, \ldots , n)$ ์ ๋ํ $f $ ์ ์๊ฐ๋ณํ์จ์ $f $ ์ $x_{i}$ ์ ๋ํ ํธ๋ํจ์ (partial derivative)๋ผ๊ณ ํ๋ค. 2. ํจ์์ ๊ธฐ์ธ๊ธฐ (1) Gradient ์ด๋ค ํจ์ $f$ ..