[GoogleML] Optimization Algorithms

2023. 9. 20. 21:49ใ†ArtificialIntelligence/2023GoogleMLBootcamp

 

 

 

Mini-batch Gradient Descent

training set ๋ฐ์ดํ„ฐ ์ˆ˜๊ฐ€ ๋„ˆ๋ฌด ๋งŽ๋‹ค๋ฉด?

 

 

 

5 000 000 ์„ 1000 size์˜ ๋ฐฐ์น˜๋กœ ๋‚˜๋ˆ„์–ด, ์ด 5000๊ฐœ์˜ ๋ฐฐ์น˜ ์ƒ์„ฑ

 

 

 

ํ•œ epoch์„ ๋Œ๊ณ , update๊ฐ€ ๋œ ์ƒํ™ฉ

 

 

 

Understanding Mini-batch Gradient Descent

์ค„์–ด๋“ค์ง€๋งŒ, ๋” noisyํ•œ ๊ฒฝํ–ฅ์ด ์žˆ๋‹ค

 

 

 

๋งค์šฐ ์•ˆ์ • vs ๋งค์šฐ ๋…ธ์ด์ฆˆ

batch๋„ ์‹œ๊ฐ„์ด ๋งŽ์ด ๊ฑธ๋ฆฐ๋‹ค.

์ด ๋‘˜์˜ ํ•˜์ด๋ธŒ๋ฆฌ๋“œ

 

 

 

๋„ˆ๋ฌด ํฌ๊ฑฐ๋‚˜ ์ž‘์ง€ ์•Š์€ ๋ฏธ๋‹ˆ ๋ฐฐ์น˜ ์‚ฌ์ด์ฆˆ 

1. vectorization

2. ์ „์ฒด๋ฅผ full๋กœ ๋‹ค ๊ธฐ๋‹ค๋ฆด ํ•„์š” X

 

 

 

1. 2000๊ฐœ ์ดํ•˜์˜ ๋ฐ์ดํ„ฐ -> full batch

2. ํฐ ๋ฐ์ดํ„ฐ ์…‹ -> 64 / 128 / 512 ์ค‘ ํ•˜๋‚˜๋ฅผ ํƒํ•ด์„œ ์‚ฌ์šฉ

3. GPU / CPU ๋ฉ”๋ชจ๋ฆฌ์— ๋งž๊ฒŒ ์‚ฌ์šฉ ์ฃผ์˜

 

 

 

Exponentially Weighted Averages

real data -> ์กฐ๊ธˆ ๋…ธ์ด์ฆˆ

 

 

 

๊ณผ๊ฑฐ์˜ ๊ฐ’์„ ๋ฐ˜์˜ (like ๊ด€์„ฑ) / ์„ธํƒ€๋Š” ์˜ค๋Š˜, ํ˜„์žฌ์˜ ์˜จ๋„๋ฅผ ์˜๋ฏธํ•œ๋‹ค

 

 

 

 

 

 

 

 

 

Understanding Exponentially Weighted Averages

์ž์—ฐ ์ƒ์ˆ˜ e์˜ ์ •์˜

 

 

 

๊ณผ๊ฑฐ๋ฅผ ๋ฐ˜์˜ํ•˜์—ฌ ๋” ์•ˆ์ •์ ์œผ๋กœ ์ˆ˜๋ ดํ•˜๋„๋ก

 

 

 

Bias Correction in Exponentially Weighted Averages

 

 

 

t ๊ฐ€ ์ปค์งˆ์ˆ˜๋ก v๊ฐ€ 0์— ๊ฐ€๊นŒ์›Œ์ง

์ฆ‰, ์ดˆ๋ก ์„ ๊ณผ ๋ณด๋ผ์ƒ‰ ์„ ์ด ๊ฒน์นจ

์ดˆ๊ธฐ์—๋Š” ๊ฐ’์˜ ์ฐจ์ด๊ฐ€ ํฌ๋‹ค (์œ ํšจํ•˜๋‹ค)

 

 

 

 

'ArtificialIntelligence > 2023GoogleMLBootcamp' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[GoogleML] Hyperparameter Tuning  (1) 2023.09.20
[GoogleML] Adam Optimizer  (0) 2023.09.20
[GoogleML] Optimization Problem  (0) 2023.09.13
[GoogleML] Regularizing Neural Network  (0) 2023.09.12
[GoogleML] Setting up Machine Learning  (0) 2023.09.12