[CNN-LSTM] Dropout?

SeomIIIยท2022๋…„ 5์›” 25์ผ
0

SONSU

๋ชฉ๋ก ๋ณด๊ธฐ
23/29
post-custom-banner

๐Ÿ“ ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ๋ณ€ํ™”๋ณด๋‹ค ์˜ค๋ฒ„ํ”ผํŒ…์„ ํ•ด๊ฒฐํ•ด์•ผํ•œ๋‹ค๋Š” ํ”ผ๋“œ๋ฐฑ์„ ๋ฐ›์•˜๋‹ค.

๐Ÿ“ ์˜ค๋ฒ„ํ”ผํŒ… ๋ฌธ์ œ๋ฅผ dropout์œผ๋กœ ํ•ด๊ฒฐํ•ด๋ณด๋Š” ๊ฑด ์–ด๋– ๋ƒ๋Š” ํ”ผ๋“œ๋ฐฑ๊ณผ ํ•จ๊ป˜ ,,

  • ์šฐ๋ฆฌ์˜ dropout์€..? ํ•˜๊ณ  ํ™•์ธํ•ด๋ดค๋‹ค.
  • dropout์€ ํ•œ ์ธต์œผ๋กœ, 0.5 ์˜€๋‹ค.

๐Ÿ“Œ overfitting์„ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•

1. ๋ฐ์ดํ„ฐ ์…‹

2. regularization (์ผ๋ฐ˜ํ™”)

  • ํ•™์Šตํ•˜๋Š” ๋ฐ์ดํ„ฐ ์ˆ˜๊ฐ€ ๋งŽ์•„์•ผํ•จ.
  • ํ•„์š”์—†๋Š” feature(column)๋“ค์€ ํ•™์Šต์—์„œ ์ œํ•œ๋‹ค.
  • ์ค‘๋ณต๋˜๋Š” feature ๋˜ํ•œ ํ•ฉ์น˜๊ฑฐ๋‚˜, ๋‹จ์ผํ™” ์‹œ์ผœ์ค˜์•ผํ•จ.

๐Ÿ“Œ Dropout?

  • ๊ณผ์ ํ•ฉ์€ ๋ชจ๋ธ์ด ํ›ˆ๋ จ ๋ฐ์ดํ„ฐ์…‹์„ ๊ณผ๋„ํ•˜๊ฒŒ ํ•™์Šตํ•˜์—ฌ ํ›ˆ๋ จ ๋ฐ์ดํ„ฐ์…‹์— ๋Œ€ํ•ด์„œ๋Š” ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์ด ์ข‹์ง€๋งŒ, ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ์…‹์— ๋Œ€ํ•ด์„œ๋Š” ์˜คํžˆ๋ ค ์„ฑ๋Šฅ์ด ๋–จ์–ด์ง€๋Š” ํ˜„์ƒ์„ ๋งํ•œ๋‹ค.
  • ์ด๋Ÿฌํ•œ ๊ณผ์ ํ•ฉ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด dropout layer์„ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ๋ง ๊ทธ๋Œ€๋กœ ๋„คํŠธ์›Œํฌ์˜ ์ผ๋ถ€๋ฅผ ์ƒ๋žตํ•˜๋Š” ๊ฒƒ์ด๋‹ค.
  • ํ•™์Šต ์‚ฌ์ดํด์ด ์ง„ํ–‰๋˜๋Š” ๋™์•ˆ ๋ฌด์ž‘์œ„๋กœ ์ผ๋ถ€ ๋‰ด๋Ÿฐ์„ ์ƒ๋žตํ•˜์—ฌ ์˜ค๋ฒ„ํ”ผํŒ…์„ ๋ฐฉ์ง€ํ•œ๋‹ค.

๐ŸŒฑ ๊ทธ๋ ‡๋‹ค๋ฉด,,?
โœ”๏ธ dropout ๊ฐ’ 0.1, 0.3, 0.7 ๋กœ ์ง„ํ–‰ํ•ด๋ณด๊ธฐ โœ…
โœ”๏ธ ์˜ตํ‹ฐ๋งˆ์ด์ € adam, nadam ์œผ๋กœ ๋ฐ”๊ฟ”๋ณด๊ธฐ (๋ฉ˜ํ† ๋‹˜ ํ”ผ๋“œ๋ฐฑ) โœ…
โœ”๏ธ dropout ์ธต ์ถ”๊ฐ€ํ•ด๋ณด๊ธฐ - ์šฐ๋ฆฌ๋Š” 1์ธต ๋ฐ–์— ์—†์Œ


โœ… dropout ๊ฐ’ [ 0.1, 0.3, 0.7 ] ๋กœ ์ง„ํ–‰ํ•ด๋ณด๊ธฐ

๐Ÿ’ซ dropout : 0.1

๐Ÿ’ซ dropout : 0.3

๐Ÿ’ซ dropout : 0.7

๐ŸŒฑ ํ™•์‹คํžˆ dropout ๊ฐ’์„ ๋‚ฎ์ท„๋”๋‹ˆ ๋” ์•ˆ์ •์ ์ธ ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์˜ค๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ํ•˜์ง€๋งŒ ๋ฌด์กฐ๊ฑด์ ์œผ๋กœ 0.1๋กœ ํ•  ์ˆœ ์—†์„ ๊ฒƒ๊ฐ™๋‹ค. 0.3์ด train acc๊ฐ€ ๋” ๋†’๊ธฐ ๋•Œ๋ฌธ,,


โœ”๏ธ ์˜ตํ‹ฐ๋งˆ์ด์ € adam, nadam ์œผ๋กœ ๋ฐ”๊ฟ”๋ณด๊ธฐ (๋ฉ˜ํ† ๋‹˜ ํ”ผ๋“œ๋ฐฑ)

๐Ÿ’ซ adam

๐Ÿ’ซ nadam

๐ŸŒฑ ๋ฉ˜ํ† ๋‹˜์˜ ํ”ผ๋“œ๋ฐฑ์œผ๋กœ ์˜ตํ‹ฐ๋งˆ์ด์ €๋ฅผ ๋ณ€๊ฒฝํ•ด๋ณด์•˜๋Š”๋ฐ, (๊ธฐ์กด์€ sgd) ์˜ตํ‹ฐ๋งˆ์ด์ €๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ์€ ์ข‹์€ ๋ฐฉ์•ˆ์€ ์•„๋‹Œ ๊ฒƒ ๊ฐ™๋‹ค.


โ“ dense? dropout? - ์šฐ๋ฆฌ ๋ชจ๋ธ์— ๋Œ€ํ•œ ์ดํ•ด๋„ ๋†’์ด๊ธฐ
โ“ ๊ธฐ์กด ์ฒ˜์Œ ์ฐธ๊ณ ํ•˜๋˜ ๋…ผ๋ฌธ์€ incepton v3, adam ์‚ฌ์šฉ.


์ฐธ๊ณ 
https://blog.naver.com/PostView.naver?blogId=laonple&logNo=220818841217

https://hyewonleess.github.io/cnn/CNN_options/

https://pythonkim.tistory.com/42

profile
FE Programmer
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€