[๋…ผ๋ฌธ์ •๋ฆฌ๐Ÿ“ƒ] Inception-v4 Inception-ResNet and the Impact of Residual Connections on Learning

Inception-v4 Inception-ResNet and the Impact of Residual Connections on Learning

- Inception-v4, Inception-ResNet-v2 -

๋…ผ๋ฌธ์›๋ณธ๐Ÿ˜™

์ด๋ฒˆ ๋…ผ๋ฌธ์€ inveption-v2์™€ resnet-v2์˜ ๋„คํŠธ์›Œํฌ ๊ตฌ์กฐ๋“ค์„ ์‚ดํŽด๋ณผ ์ˆ˜ ์žˆ๋Š” ๋‚ด์šฉ์ด์—ˆ๋‹ค. ๋„คํŠธ์›Œํฌ ๊ตฌ์กฐ์™€ residual connection์ด๋ผ๋Š” ๊ฐœ๋…์— ๋Œ€ํ•œ ํ•ต์‹ฌ๋งŒ ์งš์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋งŽ์€ ์‹œ๊ฐ„์ด ์†Œ์š”๋˜๋Š” ๋…ผ๋ฌธ์€ ์•„๋‹ˆ์—ˆ๋‹ค.

Inception-v4 ์ฝ”๋“œ๊ตฌํ˜„ ํŽ˜์ด์ง€. => Inception-v4

0. ์š”์•ฝ

residual connection์œผ๋กœ ์ธํ•ด Inception networks์˜ ํ•™์Šต์†๋„๊ฐ€ ๊ฐ€์†ํ™” ๋œ๋‹ค.

1. Introduction

์ด ๋…ผ๋ฌธ์—์„œ๋Š” residual connection(์ž”์—ฌ์—ฐ๊ฒฐ)๊ณผ ๊ฐ€์žฅ์ตœ๊ทผ ๊ฐœ์ •๋œ ๋ฒ„์ „์˜ Inception๊ตฌ์กฐ์— ๋Œ€ํ•ด ์„ค๋ช…ํ•œ๋‹ค.

  • residual connections : ๋งค์šฐ ๊นŠ์€ ๊ตฌ์กฐ๋ฅผ ํ•™์Šตํ•˜๊ธฐ ์œ„ํ•œ ๊ฒƒ.

  • inception ๊ตฌ์กฐ : inception ๋„คํŠธ์›Œํฌ๊ฐ€ ์•„์ฃผ ๊นŠ์–ด์ง€๋ฉด์„œ inception ๊ตฌ์กฐ์˜ ์—ฐ์† ์Šคํ…Œ์ด์ง€๊ฐ€ residual connection์œผ๋กœ ๋Œ€์ฒด๋˜์—ˆ๋‹ค.

    ์ด๊ฒƒ์œผ๋กœ Inception์€ ์—ฐ์‚ฐ ํšจ์œจ์„ฑ์„ ์œ ์ง€ํ•˜๋ฉด์„œ residual(์ž”์—ฌ์ )์ ‘๊ทผ์˜ ์žฅ์ ์„ ์ทจํ•  ์ˆ˜ ์žˆ๊ฒŒ๋˜์—ˆ๋‹ค. ์ฆ‰ ์—ฐ์‚ฐ๋Ÿ‰์€ ๊ทธ๋Œ€๋กœ์ด๋ฉด์„œ๋„ residual connection์ด ์ฃผ๋Š” ์žฅ์ ์„ ๋”ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ๋˜ํ•œ, inception ์‹ ๊ฒฝ๋ง์„ ์ข€ ๋” ํšจ๊ณผ์ ์œผ๋กœ ๋„“๊ณ  ๊นŠ๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด ๋‚˜์˜จ ๊ฒƒ์ด inception-v4์ด๋‹ค. inception-v4๋Š” inception-v3๋ณด๋‹ค ๋‹จ์ˆœํ•˜๊ณ  ํš์ผํ™”๋œ ๊ตฌ์กฐ์™€ ๋” ๋งŽ์€ inception module์„ ์‚ฌ์šฉํ•œ๋‹ค.

์ด ๋…ผ๋ฌธ์—์„œ๋Š” Inception-v4์™€ Inception-ResNet ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๊ณ  ์žˆ๋‹ค.

  • Inception-ResNet์€ Inception-v4์— residual connection์„ ๊ฒฐํ•ฉํ•œ ๊ตฌ์กฐ์ด๋ฉฐ ํ•™์Šต ์†๋„๊ฐ€ ๋น ๋ฅด๋‹ค.


Convolutional networks๋Š” ๊ทœ๋ชจ๊ฐ€ ํฐ ์ด๋ฏธ์ง€ ์ธ์‹์—์„œ ๋งค์šฐ ์œ ๋งํ•ด์ง€๊ณ  ์žˆ๋‹ค. ๊ทธ ๋‹ค์Œ์œผ๋กœ ์ค‘์š”ํ•˜๊ฒŒ ์ฃผ๋ชฉ๋œ ๊ฒƒ์ด Network-In-Network ๊ตฌ์กฐ์˜€๋‹ค.

residual connection์€ He et al. ์— ์˜ํ•ด ์†Œ๊ฐœ๋˜์—ˆ์œผ๋ฉฐ , residual connection์€..

(1) ์ด๋ฏธ์ง€ ์ธ์‹๊ณผ ํŠนํžˆ ๊ฐ์ฒด์ธ์‹์— ํšจ๊ณผ์ ์ด๋ผ๋Š” ๊ฒƒ์„ ์ด๋ก ์ ์œผ๋กœ, ์‹ค์งˆ์ ์ธ ์ฆ๊ฑฐ๋กœ ํ™•์‹ ๋˜๊ณ ์žˆ๋‹ค.

(2) residual connections์€ ๋งค์šฐ ๊นŠ์€ ์ปจ๋ณผ๋ฃจ์…˜ ๋ชจ๋ธ์„ ํ•™์Šตํ•˜๋Š”๋ฐ ํ•„์š”ํ•˜๋‹ค๊ณ  ์ฃผ์žฅํ•œ๋‹ค.

(3) ํ•™์Šต์†๋„๋ฅผ ๋งค์šฐ ๋น ๋ฅด๊ฒŒ ํ–ฅ์ƒ์‹œํ‚จ๋‹ค.


3. Architecural Choices

1. Pure Inception blocks

์˜ˆ์ „ Inception ๋ชจ๋ธ์€ ๋ถ„ํ•  ํ•™์Šต๋˜๊ณค ํ–ˆ๋‹ค. (๋ฉ”๋ชจ๋ฆฌ์— ์ „์ฒด ๋ชจ๋ธ์ด ๋งž์ถฐ์ง€๊ธฐ ์œ„ํ•ด์„œ ๊ฐ๊ฐ์˜ ๋ณต์ œํ’ˆ์ด ์—ฌ๋Ÿฌ๊ฐœ์˜ ํ•˜์œ„ ๋„คํŠธ์›Œํฌ(sub-networks)๋กœ ๋ถ„ํ• ๋˜์–ด ํ•™์Šต๋˜์—ˆ๋‹ค๋Š” ๋œป์ด๋‹ค.) ํ•˜์ง€๋งŒ, inception ๊ตฌ์กฐ๋Š” ์กฐ์œจ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ์ด ๋ง์€ ์ฆ‰, fully-trained network์˜ ํ€„๋ฆฌํ‹ฐ์— ์˜ํ–ฅ์„ ๋ฏธ์น˜์ง€ ์•Š๋Š” ๋‹ค์–‘ํ•œ ๋ ˆ์ด์–ด๋“ค์— ๋งŽ์€ ํ•„ํ„ฐ๋“ค์„ ๋ณ€ํ™”์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ์—ฌ๋Ÿฌ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

ํ•™์Šต ์†๋„๋ฅผ ์ผ๋ฐ˜ํ™”์‹œํ‚ค๊ธฐ ์œ„ํ•ด์„œ ๋‹ค์–‘ํ•œ ๋ชจ๋ธ ํ•˜์œ„ ๋„คํŠธ์›Œํฌ๋“ค ๊ฐ„์˜ ์—ฐ์‚ฐ์˜ ๊ท ํ˜•์„ ์œ„ํ•ด ์šฐ๋ฆฌ๋Š” ๋ ˆ์ด์–ด ์‚ฌ์ด์ฆˆ๋ฅผ ์กฐ์œจํ•˜๊ณค ํ–ˆ๋‹ค. ๋ฐ˜๋Œ€๋กœ tensorflow์˜ ๋“ฑ์žฅ์œผ๋กœ ๊ฐ€์žฅ ์ตœ๊ทผ์˜ ๋ชจ๋ธ์€ ๋ณต์ œํ’ˆ์„ ๋ถ„ํ• ํ•˜์ง€ ์•Š๊ณ  ํ•™์Šต์ด ๊ฐ€๋Šฅํ•ด์กŒ๋‹ค.

์ด๊ฒƒ์ด ์–ด๋–ป๊ฒŒ ๊ฐ€๋Šฅํ•œ์ง€ ์ž์„ธํžˆ ๋งํ•˜์ž๋ฉด! ๊ธฐ์šธ๊ธฐ ์—ฐ์‚ฐ๊ณผ ๊ตฌ์กฐํ™”ํ•˜๋Š” ์—ฐ์‚ฐ์— ์–ด๋–ค ํ…์„œ๊ฐ€ ์‚ฌ์šฉ๋˜๋Š”์ง€ ๊ณ ๋ คํ•˜์—ฌ ํŠน์ • ํ…์„œ๋“ค์„ ์ค„์ž„์œผ๋กœ์จ backpropagation์— ์˜ํ•ด ์‚ฌ์šฉ๋˜๋Š” ๋ฉ”๋ชจ๋ฆฌ์˜ ์ตœ์ ํ™”๊ฐ€ ๊ฐ€๋Šฅํ•ด ์ง„ ๊ฒƒ์ด๋‹ค.

Inception v4๋ฅผ ์œ„ํ•œ ์ƒˆ๋กœ์šด ์‹คํ—˜์€ ๋ถˆํ•„์š”ํ•œ ์ง(์˜ˆ์ „์— ์‚ฌ์šฉํ•˜๋˜ ๋„คํŠธ์›Œํฌ ๊ตฌ์กฐ๋ฅผ ๋œปํ•˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค, ๋‚˜๋จธ์ง€ ๋„คํŠธ์›Œํฌ๋Š” ๋†”๋‘” ์ฑ„ ๋„คํŠธ์›Œํฌ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋‹ค์–‘ํ•˜๊ฒŒ ๋ถ„๋ฆฌํ•˜๋Š” ์ œํ•œ์ ์ธ ์‹คํ—˜๋ฐฉ์‹)์„ ๋ฐฐ์ œํ•˜๊ณ  ๊ฐ ๊ทธ๋ฆฌ๋“œ ์‚ฌ์ด์ฆˆ๋ฅผ ์œ„ํ•ด inception block์— ๋Œ€ํ•ด ํš์ผํ™”๋œ ์„ ํƒ์„ ํ•˜์˜€๋‹ค.


๋‹ค์Œ์€ Inception-v4์˜ ์ „์ฒด์ ์ธ๊ตฌ์กฐ์™€ ๋ถ€๋ถ„์  ๊ตฌ์กฐ๋“ค์ด๋‹ค.

inceptionv4

Inception-v4๋Š” ์ด์ „ ๋ฒ„์ „์—์„œ์˜ ๋‹จ์ ์„ ๊ฐœ์„ ํ•˜๊ณ , inception block์„ ๊ท ์ผํ•˜๊ฒŒ ํš์ผํ™” ํ•˜์˜€๋‹ค.

๋‹ค์Œ์€ Inception-Resnet์˜ ์ „์ฒด์  ๊ตฌ์กฐ์™€ ๋ถ€๋ถ„์  ๊ตฌ์กฐ๋“ค์ด๋‹ค.

inceptionresnet

Inception-Resnet์€ Inception network์™€ residual block์„ ๊ฒฐํ•ฉํ•œ ํ˜•ํƒœ์ด๋‹ค. Inception-ResNet์€ v1๋ฒ„์ „๊ณผ v2๋ฒ„์ „์ด ์žˆ์œผ๋ฉฐ ์ด ๋‘˜์˜ ์ „์ฒด ๊ตฌ์กฐ๋Š” ๊ฐ™์ง€๋งŒ, ๊ฐ ๋ชจ๋“ˆ์— ์ฐจ์ด๊ฐ€ ์žˆ๋‹ค!

stem๊ณผ ๊ฐ inception module์—์„œ ์‚ฌ์šฉํ•˜๋Š” filter์ˆ˜๊ฐ€ ๋‹ค๋ฅด๋‹ค๋Š” ๊ฒƒ์ด ๊ทธ ์ฐจ์ด์ด๋‹ค.



2. Residual Inception Blocks

inception ๋„คํŠธ์›Œํฌ์˜ residual ๋ฒ„์ „์—์„œ๋Š” original incetpion ๋ณด๋‹ค ๊ฐ€๋ฒผ์šด inception block์„ ์‚ฌ์šฉํ•œ๋‹ค.

๊ฐ inception block ๋‹ค์Œ์—๋Š” input๊ฐ’์˜ ๊นŠ์ด์— ๋งž์ถฐ์ง€๊ธฐ ์œ„ํ•œ addition์ „์— ํ•„ํ„ฐ์˜ ์ฐจ์›์„ ์ปค์ง€๊ฒŒ ํ•˜๋Š” filter-expansion layer (1 x 1 convolution without activation) ์ด ๋’ค๋”ฐ๋ผ์˜จ๋‹ค. ์ด๊ฒƒ์€ inception block์œผ๋กœ ์ธํ•ด ์ฐจ์›์ด ์ค„์–ด๋“  ๊ฒƒ์„ ๋ณด์ถฉํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•˜๋‹ค.

์šฐ๋ฆฌ๋Š” ๋‹ค์–‘ํ•œ Inception์˜ residual version์„ ์‹œ๋„ํ•˜์˜€๊ณ  ๋‹ค์Œ ๋‘ ๊ฐ€์ง€ ์‚ฌ์‹ค์„ ์•Œ์•„๋‚ด์—ˆ๋‹ค.

๋ฐ”๋กœ, inception-resnet-v1์€ inception-v3์™€ ์—ฐ์‚ฐ๋Ÿ‰์ด ๋น„์Šทํ•˜๊ณ , inception-resnet-v2๋Š” inception-v4์™€ ์—ฐ์ƒ๋Ÿ‰์ด ๋น„์Šทํ•˜๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

์šฐ๋ฆฌ์˜ residual ๊ณผ non-residual Inception variants ์˜ ์ž‘์€ ๊ธฐ์ˆ ์ ์ธ ์ฐจ์ด๋Š” Inception-ResNet์— ์žˆ๋‹ค. ์šฐ๋ฆฌ๋Š” batch-normalization์„ ์˜ค์ง ์ „ํ†ต์  ๋ ˆ์ด์–ด์˜ ์œ„์— ์‚ฌ์šฉํ•˜์˜€๊ณ  summation์˜ ์œ„์—๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š์•˜๋‹ค.

batch-normalization์„ ํ†ตํ•ด ์žฅ์ ์„ ๊ธฐ๋Œ€ํ•˜๋Š” ๊ฒƒ์€ ๋งค์šฐ ํ•ฉ๋ฆฌ์ ์ด๊ฒŒ ๋ณด์ด๋‚˜ ์šฐ๋ฆฌ๋Š” ๊ฐ ๋ชจ๋ธ์˜ ๋ณต์ œํ’ˆ์„ ํ•˜๋‚˜์˜ GPU์— ํ•™์Šต์‹œํ‚ค๊ณ  ์‹ถ์—ˆ๋‹ค. ํฐ ํ™œ์„ฑํ™” ์‚ฌ์ด์ฆˆ๋ฅผ ๊ฐ€์ง„ ๋ ˆ์ด์–ด์˜ ๋ฉ”๋ชจ๋ฆฌ footprint ๋Š” ์ ์ ˆ์น˜ ๋ชปํ•œ ์–‘์˜ GPU ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์†Œ๋ชจํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์—ˆ๋‹ค. ๋”ฐ๋ผ์„œ batch-normalization์„ ์ด ๋ ˆ์ด์–ด๋“ค์˜ ์ƒ์œ„์—์„œ ์ œ๊ฑฐํ•จ์œผ๋กœ์จ Inception blocks์˜ ์ „๋ฐ˜์  ์ˆซ์ž๋ฅผ ๋Š˜๋ฆด ์ˆ˜ ์žˆ์—ˆ๋‹ค.


Inception-v4๋ฅผ ์ฝ”๋“œ๋กœ ๊ตฌํ˜„ํ•œ๊ฒƒ์„ ์ •๋ฆฌํ•œ ํŽ˜์ด์ง€์ด๋‹ค. => Inception-v4


์ฐธ๊ณ 

[1] https://deep-learning-study.tistory.com/525

ํƒœ๊ทธ: ,

์นดํ…Œ๊ณ ๋ฆฌ:

์—…๋ฐ์ดํŠธ:

๋Œ“๊ธ€๋‚จ๊ธฐ๊ธฐ