Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications #44

Open
chullhwan-song opened this issue Aug 16, 2018 · 2 comments
Labels

Comments

@chullhwan-song
Copy link
Owner

chullhwan-song commented Aug 16, 2018

https://arxiv.org/abs/1704.04861

@chullhwan-song
Copy link
Owner Author

chullhwan-song commented Aug 16, 2018

what ?

  • 계산량과 weight값들을 줄임으로써, 모바일 환경에서 run할수 있도록하는게 목적
    • standard convolution 계산은 redundancy가 크다. > Depthwise Separable Convolution
  • Depthwise(깊이별) Separable Convolution
    • filters & combines 개념의 분리, factorized -> 2 layers -> 실제 진행 순서는 filter -> combining
      • filtering : depthwise convolution> applies a single filter to each input channel. (하나의 채널단위로 하는듯~)
      • combination : pointwise convolution > 1x1 convolution
    • 비교 설명 : standard convolution vs Depthwise Separable Convolution
      • standard convolution
        • image 의 Feature Map F > image 크기의 Kernel > image 의 output, (오타인가 output의 DF는 DG 인듯)
          • M은 input feature map의 channel
          • N은 output feature map의 channel
            image 이라 표현할수 있고, (stride, padding = 1) 이때의 computational cost는,
            image
          • image : K size의 Kernel
    • Depthwise Separable Convolution
      • it uses depthwise separable convolutions to break the interaction between the number of output channels and the size of the kernel. : 커널의 크기와 아웃풋채널의 개수의 곱으로 계산량이 증가하는 것을 방지
        image
        • depthwise convolution에서는 위의 그림에서 보듯이, 한개의 channel를 가진 filtering을 적용한다. (to apply a single filter per each input channel (input depth).)
          image
          • imageimage 크기의 kernel
          • image의 m 번째 필터가 적용된 입력값(feature map) F의 m번째 값은, 역쉬나 output feature map image 의 m번째값으로 출력된다.
          • computational cost 은,
            image
          • 3x3
        • Pointwise convolution
          • depthwise convolution은 단지 입력을 filtering한 것 뿐이다.
            • 즉, 새로운 feature의 형태가 아니라고 주장하는데(?) 그냥 convolution 연산의 임의 output N의 형태로 만들어지지 않았다란 뜻으로 받아들여진다.
          • 1x1xN 즉, 1x1짜리 2d kernel기반의 N개 차원을 가진 필터를 결합한다.
          • depthwise convolution과 합한 computational cost 은,
            image
        • 기존 standard covolution 보다 cost는 다음과 같이 줄어든다.
          image

실험

  • MobileNet 연산량 비율
    • N(= 32~1024) > (D_k)^2(= 9) 이므로 depthwise convolution filter 에서 연산량 감소가 크다
      image

image

@chullhwan-song
Copy link
Owner Author

chullhwan-song commented Aug 16, 2018

Separable Convolution 1

  • rigid-motion scattering for image classification 란 박사 학위 논문
    image
    image

Depthwise Separable Convolution 2

  • point-wise : The purpose of this pointwise convolution is to combine the output channels of the depthwise convolution to create new features.
    image
  • depth-wise - For an image with 3 channels, a depthwise convolution creates an output image that also has 3 channels. Each channel gets its own set of weights.
    image
  • 그래서 depth wise 담에 pointwise conv하면
    image

Point-wise convolution vs Depth-wise convolution 2

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant