difference between SeparableConv and DepthwiseConv 본문

ML & DL/이것저것..

difference between SeparableConv and DepthwiseConv

eremo2002 2019. 1. 15. 21:16

Depthwise separable Convolution은 Depthwise convolution과 1x1 convolution(pointwise convolution)의 두 가지 컨볼루션 연산을 합한 것이다.


케라스의 convolutional layer는 여러 개가 있지만 그 중 SeparableConv와 DepthwiseConv이라는 레이어의 차이를 간략히 정리한다.


케라스의 SeparableConv layer는 Depthwise separable Convolution을 뜻한다.

즉, Depthwise conv + pointwise conv를 하나의 레이어에서 수행한다.


케라스의 DepthwiseConv layer는 Depthwise separable Convolution에서 first step만 한다. 그래서 pointwise conv는 포함되지 않는다.



다시 정리하면,

Depthwise separable Convolution = Depthwise convolution -> Pointwise(1x1) convolution으로 이루어진 2 step 연산이다.

케라스에서 SeparableConv layer가 이를 수행한다.


케라스의 DepthwiseConv layer는 첫번째 step인 Depthwise convolution만 하고 Pointwise(1x1)은 하지 않는다.




SeparableConv만 있어도 될 거 같지만 DepthwiseConv가 따로 존재하는 이유는 DepthwiseConv 연산 후 Batch Normalization, Activation function을 할 수도 있기 때문이다.





Comments