๊ธฐ๋ณธ ์ฌ์ฉ const info = useQuery('unique_key', fetchData); // fetchData๋ promise ๋ฐํ uniqueํ key๋ก ์ ์ํ๋ฉฐ, key์ ๋ฌถ์ด๋ ๋ฐ์ดํฐ๋ ๋น๋๊ธฐ ๋ฐ์ดํฐ์ด๋ค. useQuery๊ฐ ๋ฐํํ๋ result๋ ๋น๋๊ธฐ ๋ฐ์ดํฐ์ ์ํ๋ฅผ ๋ด๊ณ ์๋ค. ์ํ loading isLoading์ด true๊ฐ ๋๋ค. error isError๊ฐ true๊ฐ ๋๋ฉฐ, error์ ์๋ฌ ์ ๋ณด๊ฐ ๋ด๊ธด๋ค. success isSuccess๊ฐ true๊ฐ ๋๋ฉฐ, data์ ์ ๋ณด๊ฐ ๋ด๊ธด๋ค. idle ์ฌ์ฉ ์์ const { isLoading, isError, data, error } = useQuery('key', fetchData); // const { status, data, erro..
![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FmM9Nt%2FbtqDzkBBEEv%2Fdbg5yzEiRNuwHyNMmMHDr0%2Fimg.png)
์ผ๋ฐฉํฅ ํด์ํจ์ ์ ์ ํด์ํจ์ ์ค ์ญ์์ ํญ์ฑ, ์ 2์ญ์์ ํญ์ฑ, ์ถฉ๋์ ํญ์ฑ์ ๊ฐ์ง๊ณ ์๋ ํจ์ ํด์ํจ์ : ์์ ๊ธธ์ด์ ๋ฉ์ธ์ง๋ฅผ ์ผ์ ๊ณ ์ ๊ธธ์ด์ ํด์ฌ ๊ฐ์ผ๋ก ๋ณํ์์ผ์ฃผ๋ ๋จ๋ฐฉํฅ์ฑ ํจ์/์๊ณ ๋ฆฌ์ฆ ์ญ์ ์ ํญ์ฑ(preimage resistance) : ์ 1 ์ญ์ ๊ณต๊ฒฉ์ ๋ํ์ฌ ์์ ํ ๊ฒ ์ 1 ์ญ์ ๊ณต๊ฒฉ : ํด์๊ฐ์ด ์ฃผ์ด์ก์ ๋, ๊ทธ ํด์๊ฐ์ ์ถ๋ ฅํ๋ ์ ๋ ฅ๊ฐ์ ์ฐพ๋ ๊ณต๊ฒฉ ๋จ๋ฐฉํฅ ์ํธํ์ ๊ด๋ จ ์์ ๋จ๋ฐฉํฅ ์ํธํ : A => f => B (์ํธํ) A
![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F9UIbC%2FbtqCjSlzW8s%2FHJftTm99k0Mrulr3fBilW1%2Fimg.png)
์ธ๊ณต์ ๊ฒฝ๋ง ์ค๊ณ ์ ๊ณ ๋ ค์ฌํญ Network topology ๋คํธ์ํฌ์ ๋ชจ์ (feed forward, feed backward) Activation function ์ถ๋ ฅ์ ํํ Objectives ๋ถ๋ฅ? ํ๊ท? Loss function, Error๋ก ๋ํ๋ผ ์ ์์ Optimizers weight update Generalization Overfitting ๋ฐฉ์ง 2. activation function ์ถ๋ ฅ์ ํํ ๊ฒฐ์ 1. one-hot vector ์ฌ๋ฌ ๊ฐ ์ค ํ๋์ ๊ฐ๋ง ์ถ๋ ฅ ex_ ์ซ์ ์๋ณ 2. softmax function ํด๋น ์ถ๋ ฅ์ด ๋์ฌ ํ๋ฅ ๋ก ํํ 3. objective function ๊ธฐํ ๋ชฉ์ ํจ์ Mean absolute error / mae Mean absolute percentag..
![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdyFxBR%2FbtqBGqO5Hrh%2FmQvV0ORbJajEbA6h6R5lk0%2Fimg.png)
๋ฅ๋ฌ๋์ ์์ ์ด๋ฌํ multi-layer ์ forward-propagation ๊ณผ์ ์ ์์ผ๋ก ๋ํ๋ด๋ณด๋ฉด, h1 = f(x11*w11+x12*w21) net = h1*w13+h2*w23 = f(x11*w11+x12*w21)*w13+f(x11*w12+x12*w22)*w23 ์ฌ๊ธฐ์ f ์ฆ, activation fuction์ด linearํ function์ด๋ผ๊ณ ๊ฐ์ ํด๋ณด์. ๊ทธ๋ ๋ค๋ฉด f(x) = ax์ ํํ์ด๋ฏ๋ก, net = x11*a(w11*w13+w12*w23)+x12*a(w21*w13+w22*w23) ์ผ๋ก ๋ํ๋ผ ์ ์๋ค. ๊ทธ๋ฆฌ๊ณ ์ด๋ฌํ net์ ๊ฐ์ฅ ์ฒ์์ ์ฃผ์ด์ง input layer์๋ค๊ฐ ์์๋ฅผ ๊ณฑํ ๊ผด์ด๋ฏ๋ก one-layer๋ก ๋ํ๋ผ ์ ์๋ค. ์ฆ, ์ฌ๋ฌ ๊ฐ์ layer๋ฅผ ๊ฑฐ์ณค์์๋ ์ฌ์ด ๋ฌธ์ ๋ก ..
![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FuF6DB%2FbtqBE1PP2pE%2FKbikgn6uyvy26o9ZcaQbnK%2Fimg.png)
weight์ ๋ณํ 1. ๋๋ค ์ค์ต one-layer perceptron weight๋ฅผ ๋๋ค์ผ๋ก ํ์ตํ๋ ํผ์ ํธ๋ก ๋ง๋ค๊ธฐ input, weight ๊ฐฏ์๋ ์ ๋ ฅ๋ฐ๊ธฐ output์ 1๊ฐ๋ก ๊ณ ์ /* 2020-01-28 W.HE one-layer perceptron */ #include #include #include main() { /* variable set */ int input_num; float* input; float* w; float output = 0; float answer = 3; int try_num = 0; /* input input_num */ printf("enter number of inputs\n"); scanf_s("%d", &input_num); /* memory allocat..
Comment