์ธ๊ณต์ง€๋Šฅ ๐ŸŒŒ/CS231n 4

CS231n 5๊ฐ• Convolutional Neural Networks

Convolutional Neural Networks ๊ธฐ์กด์˜ FC layer์—์„œ๋Š” 32 x32 x 3์˜ ์ด๋ฏธ์ง€๋ฅผ ํ•˜๋‚˜์˜ ๋ฒกํ„ฐ๋กœ ํŽผ์นœ๋‹ค์Œ์— ๊ฐ€์ค‘์น˜๋ฅผ ๊ณฑํ•˜์˜€๋‹ค. ํ•˜์ง€๋งŒ CNN์—์„œ๋Š” ๊ธฐ์กด์˜ ์ด๋ฏธ์ง€ ๊ตฌ์กฐ๋ฅผ ๊ทธ๋Œ€๋กœ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค. CNN์—์„œ๋Š” ์ž‘์€ ํ•„ํ„ฐ๊ฐ€ ๊ฐ€์ค‘์น˜๊ฐ€ ๋˜๋Š”๋ฐ, ์œ„์˜ ์˜ˆ์‹œ์—์„œ๋Š” 5x5x3์˜ shape๋ฅผ ๊ฐ€์ง€๋Š” ํ•„ํ„ฐ๊ฐ€ ์šฐ๋ฆฌ์˜ ๊ฐ€์ค‘์น˜์ธ ๊ฒƒ์ด๋‹ค. ์ด ํ•„ํ„ฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์ด๋ฏธ์ง€๋ฅผ ์Šฌ๋ผ์ด๋”ฉํ•˜๋ฉด์„œ ๊ฐ€์ค‘์น˜์™€ ์ž…๋ ฅ์„ ๊ณฑ(๋‚ด์ )ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋ฏธ์ง€๋Š” channel ์„ ๊ฐ€์ง€๋Š”๋ฐ, ํ•„ํ„ฐ๋„ ์ด๋ฏธ์ง€์™€ ๋™์ผํ•œ ๊นŠ์ด์˜ channel์„ ๊ฐ€์ง„๋‹ค. ๊ฐ€๋ น 32 x 32 x 3 ์˜ ์ด๋ฏธ์ง€์— 5x5x3์˜ ํ•„ํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ด๋ฏธ์ง€์˜ ๊ฐ€๋กœ ์„ธ๋กœ์˜ ๊ด€์ ์—์„œ๋Š” ์ผ๋ถ€๋ฅผ ๋ณด์ง€๋งŒ ๊นŠ์ด๋Š” ์ „์ฒด๋ฅผ ๋ณด๋Š” ๊ฒƒ์ด๋‹ค. ํ•„ํ„ฐ๋Š” ์ด๋ฏธ์ง€๋ฅผ sliding ํ•˜๋ฉด์„œ ํ•„ํ„ฐ์˜ ๊ฐ ..

CS231n 4๊ฐ• Introduction to Neural Networks

3๊ฐ• ์š”์•ฝ ํ•จ์ˆ˜ F๋กœ classifier(network) ์ •์˜ (x : input data, W : weights, ์ถœ๋ ฅ : score vector) Loss function ์œผ๋กœ ์šฐ๋ฆฌ์˜ ํ•จ์ˆ˜ F๊ฐ€ ์–ผ๋งˆ๋‚˜ ์„ฑ๋Šฅ์ด ์•ˆ์ข‹์€์ง€ ํ™•์ธ (e.g. SVM, BCE ๋“ฑ...) ํ•จ์ˆ˜ F๊ฐ€ training dataset์—๋งŒ fit ํ•˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด(์šฐ๋ฆฌ์˜ ๋ชฉํ‘œ๋Š” test dataset) Regularization term ์ถ”๊ฐ€ Loss๊ฐ€ ๊ฐ€์žฅ ๋‚ฎ์•„์ง€๋Š” W๋ฅผ ์ฐพ๊ณ ์ž Gradient Descent ํ™œ์šฉ Computational graphs ์šฐ๋ฆฌ๋Š” ์ตœ์ข…์ ์œผ๋กœ gradient ๊ฐ’์„ ์ž๋™์œผ๋กœ ๊ณ„์‚ฐํ•˜๊ธฐ ์œ„ํ•ด analytic gradient๋ฅผ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค. Computational graph ๋ฅผ ํ™œ์šฉํ•˜์—ฌ analytic g..

CS231n 3๊ฐ• Loss Functions and Optimization

Linear classifier์„ ์ •์˜ํ–ˆ๋‹ค๋ฉด ์ด์ œ๋Š” ๋ญ˜ ํ•ด์•ผํ• ๊นŒ? ์šฐ์„  ์ข‹์€ ๊ฐ€์ค‘์น˜(W)๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. ๊ทธ๋ ‡๋‹ค๋ฉด ์šฐ๋ฆฌ์˜ ๊ฐ€์ค‘์น˜๊ฐ€ ์ข‹์€์ง€ ๋‚˜์˜์ง€๋ฅผ ์–ด๋–ป๊ฒŒ ์•Œ ์ˆ˜ ์žˆ์„๊นŒ? => W๋ฅผ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์•„์„œ ์Šค์ฝ”์–ด๋ฅผ ํ™•์ธํ•˜๊ณ  ์šฐ๋ฆฌ์˜ W๊ฐ€ ์–ผ๋งˆ๋‚˜ ์ข‹๊ณ  ๋‚˜์œ์ง€๋ฅผ ์ •๋Ÿ‰ํ™” ํ•ด์ฃผ๊ธฐ ์œ„ํ•œ ์†์‹คํ•จ์ˆ˜๊ฐ€ ํ•„์š” => ์†์‹คํ•จ์ˆ˜๋ฅผ ์ด์šฉํ•ด์„œ Loss๋ฅผ ์ตœ์†Œํ™” ํ•˜๋Š” ์ตœ์ ์˜ W๋ฅผ ์ฐพ์•„์•ผ ํ•จ(์ตœ์ ํ™”) Define a loss function that quantifies our unhappiness with the scores across the training data. ํ•™์Šต ๋ฐ์ดํ„ฐ ์ „์ฒด scores์— ๋Œ€ํ•ด ๊ฐ€์ค‘์น˜(๋ชจ๋ธ)์˜ ์„ฑ๋Šฅ์„ ์ˆ˜์น˜ํ™”ํ•˜๊ธฐ ์œ„ํ•œ loss function์„ ์ •์˜ Come up with a way of efficien..

CS231n 2๊ฐ• Image Classification Pipeline

Image Classification Problem A core task in Computer Vision ๊ณ ์–‘์ด๋‚˜ ๊ฐ•์•„์ง€ ํŠธ๋Ÿญ๊ณผ ๊ฐ™์€ ์ด๋ฏธ์ง€๋ฅผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋ถ„๋ฅ˜ํ•˜๋Š” ๋ฌธ์ œ๋Š” ์‚ฌ๋žŒ์—๊ฒŒ๋Š” ์‰ฝ์ง€๋งŒ ์ปดํ“จํ„ฐ์—๊ฒŒ๋Š” ์–ด๋ ค์šด ๋ฌธ์ œ์ด๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ์ด๋ฏธ์ง€๋ฅผ ๋ฐ”๋ผ๋ณด๋Š” ๋ฐฉ์‹๊ณผ ์ปดํ“จํ„ฐ๊ฐ€ ๋ฐ”๋ผ๋ณด๋Š” ๋ฐฉ์‹์—๋Š” ์ฐจ์ด๊ฐ€ ์žˆ๋‹ค. ์ปดํ“จํ„ฐ๋Š” ์ด๋ฏธ์ง€๋ฅผ ํ”ฝ์…€์ด๋ผ๋Š” ๋‹จ์œ„๋กœ ์ฝ๊ฒŒ ๋œ๋‹ค. ์šฐ๋ฆฌ์˜ ์ด๋ฏธ์ง€๊ฐ€ 800 x 600 ์˜ x 3 (3 : channels RGB) ํฌ๊ธฐ๋ฅผ ๊ฐ€์ง„๋‹ค๊ณ  ํ•˜๋ฉด ์ปดํ“จํ„ฐ๋Š” 800 x 600 x 3 ๊ฐœ์˜ ์ˆซ์ž ์ •๋ณด๋กœ ์ด๋ฏธ์ง€๋ฅผ ์ฝ๋Š” ๊ฒƒ์ด๋‹ค. Semantic Gap ๊ณ ์–‘์ด ์‚ฌ์ง„์„ ์˜ˆ๋กœ ๋“ค์ž๋ฉด, ๊ณ ์–‘์ด๋Š” ์šฐ๋ฆฌ๊ฐ€ ์ด๋ฏธ์ง€์— ๋ถ€์—ฌํ•œ semantic label ์ด๋‹ค. ๊ณ ์–‘์ด๋ผ๋Š” semantic idea์™€ pixel ๊ฐ’ (์ด๋ฏธ์ง€ ๋ฐฐ์—ด) ์‚ฌ์ด์—๋Š” ํฐ..

๋ฐ˜์‘ํ˜•