SlideShare uma empresa Scribd logo
1 de 7
Convolution
Pointwise convolution
depthwise convolution ?
2017. 6
김홍배
최근 Xception, MobileNtes등에서 사용되는 다양한
convolution 기술 중
일반적인 convolution, Pointwise convolution
(1x1 convolution)과 depthwise convolution의 차이는 ?
목적 : CNN의 계산량 및 매개변수 수를 줄임으로써
Xception은 큰 이미지 인식의 고속화
MobileNets은 정도를 유지하면서 Networks의 경량화
Pointwise convolution과 depthwise convolution의 장점을
이해하기 위해, 우선 일반 convolution의 계산량 및 parameter
수에 대해 생각해보면
어떤 CNN에 대한 입력 특징 맵의 크기를 FxF, 입력 채널 수를 N,
커널 크기를 KxK, 출력 채널 수를 M으로 하면,
이 CNN의 계산량은 F2NK2M이 된다.
이것은 입력 특징 맵 1개당 Convolution의 cost가 K2N으로
이를 입력 특징 맵 F2 개에 적용해서 1 채널의 출력 특성 맵이
생성되기 때문에, 출력 특징 맵이 M개 경우에는
위의 계산과 같다.
parameter 수가 K2N의 Convolution이 M종류이기 때문에,
K2NM이 된다.
Pointwise convolution
Pointwise convolution은 ResNet등의 skip connection에도 이용되는
1x1 convolution이다.
공간 방향의 convolution은 실시하지 않고, 채널 방향에만 convolution을
한다.
특징 맵의 차원을 늘리거나 줄일 때 이용된다.
Pointwise convolution은 일반 convolution에서 K = 1로 한 것이기 때문에,
계산량은 F2NM, parameter 수는 NM이 된다.
Depthwise convolution
Depthwise convolution는 특징맵 채널마다 각각 공간 방향의 convolution
을 수행한다.
채널 방향에 convolution을 수행하지 않기 때문에 일반 convolution 1회의
cost가 K2N에서 K2로 되므로
CNN의 계산량은 F2NK2, parameter 수는 K2N이 된다.
일반적인 convolution이 특징 맵의 공간 방향 및 채널 방향으로 동시에
convolution 을 실 시 하 는 반 면 , 채 널 방 향 의 convolution(pointwise
convolution)과 공간 방향의 convolution (depthwise convolution)을 분리
(factorize)해서 따로 계산한 후 후에 합쳐서 적용하여 공간 방향 및 채널 방
향을 동시에 convolution하는 convolution보다 적은 parameter 및 계산량으
로 근사 할 수있다.
계산량은 F2NK2M에서 F2NM + F2NK2로 감소된다.
비율로 말하면, 1/K2 + 1/M으로 되므로, 통상 M >> K2(e.g. K = 3, M≥32)이므
로, 계산량은 1/9 정도로 감소됨

Mais conteúdo relacionado

Mais procurados

The Back Propagation Learning Algorithm
The Back Propagation Learning AlgorithmThe Back Propagation Learning Algorithm
The Back Propagation Learning Algorithm
ESCOM
 

Mais procurados (20)

Object Detection Methods using Deep Learning
Object Detection Methods using Deep LearningObject Detection Methods using Deep Learning
Object Detection Methods using Deep Learning
 
Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation
Patch SVDD: Patch-level SVDD for Anomaly Detection and SegmentationPatch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation
Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation
 
Perceptron
PerceptronPerceptron
Perceptron
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장
 
03.12 cnn backpropagation
03.12 cnn backpropagation03.12 cnn backpropagation
03.12 cnn backpropagation
 
Machine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural NetworkMachine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural Network
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
 
Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10)
 
Artificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
Artificial Neural Networks Lect5: Multi-Layer Perceptron & BackpropagationArtificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
Artificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
 
Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)
 
Activation function
Activation functionActivation function
Activation function
 
Fin bert paper review !
Fin bert paper review !Fin bert paper review !
Fin bert paper review !
 
Intelligent networks, camel_services_and_applications_v1
Intelligent networks, camel_services_and_applications_v1Intelligent networks, camel_services_and_applications_v1
Intelligent networks, camel_services_and_applications_v1
 
Pr057 mask rcnn
Pr057 mask rcnnPr057 mask rcnn
Pr057 mask rcnn
 
Perceptron algorithm
Perceptron algorithmPerceptron algorithm
Perceptron algorithm
 
5G NR MIB and SIBs
5G NR MIB and SIBs5G NR MIB and SIBs
5G NR MIB and SIBs
 
The Back Propagation Learning Algorithm
The Back Propagation Learning AlgorithmThe Back Propagation Learning Algorithm
The Back Propagation Learning Algorithm
 

Destaque

Destaque (16)

Learning to remember rare events
Learning to remember rare eventsLearning to remember rare events
Learning to remember rare events
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
 
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
 
Visualizing data using t-SNE
Visualizing data using t-SNEVisualizing data using t-SNE
Visualizing data using t-SNE
 
알기쉬운 Variational autoencoder
알기쉬운 Variational autoencoder알기쉬운 Variational autoencoder
알기쉬운 Variational autoencoder
 
Learning by association
Learning by associationLearning by association
Learning by association
 
Normalization 방법
Normalization 방법 Normalization 방법
Normalization 방법
 
Explanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expertExplanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expert
 
MNIST for ML beginners
MNIST for ML beginnersMNIST for ML beginners
MNIST for ML beginners
 
A neural image caption generator
A neural image caption generatorA neural image caption generator
A neural image caption generator
 
Meta-Learning with Memory Augmented Neural Networks
Meta-Learning with Memory Augmented Neural NetworksMeta-Learning with Memory Augmented Neural Networks
Meta-Learning with Memory Augmented Neural Networks
 
Binarized CNN on FPGA
Binarized CNN on FPGABinarized CNN on FPGA
Binarized CNN on FPGA
 
Single Shot MultiBox Detector와 Recurrent Instance Segmentation
Single Shot MultiBox Detector와 Recurrent Instance SegmentationSingle Shot MultiBox Detector와 Recurrent Instance Segmentation
Single Shot MultiBox Detector와 Recurrent Instance Segmentation
 
딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization
 

Mais de 홍배 김

Mais de 홍배 김 (16)

Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
 
Gaussian processing
Gaussian processingGaussian processing
Gaussian processing
 
Lecture Summary : Camera Projection
Lecture Summary : Camera Projection Lecture Summary : Camera Projection
Lecture Summary : Camera Projection
 
Learning agile and dynamic motor skills for legged robots
Learning agile and dynamic motor skills for legged robotsLearning agile and dynamic motor skills for legged robots
Learning agile and dynamic motor skills for legged robots
 
Robotics of Quadruped Robot
Robotics of Quadruped RobotRobotics of Quadruped Robot
Robotics of Quadruped Robot
 
Basics of Robotics
Basics of RoboticsBasics of Robotics
Basics of Robotics
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명
 
Convolutional neural networks 이론과 응용
Convolutional neural networks 이론과 응용Convolutional neural networks 이론과 응용
Convolutional neural networks 이론과 응용
 
Anomaly detection using deep one class classifier
Anomaly detection using deep one class classifierAnomaly detection using deep one class classifier
Anomaly detection using deep one class classifier
 
Optimal real-time landing using DNN
Optimal real-time landing using DNNOptimal real-time landing using DNN
Optimal real-time landing using DNN
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function
 
Machine learning applications in aerospace domain
Machine learning applications in aerospace domainMachine learning applications in aerospace domain
Machine learning applications in aerospace domain
 
Anomaly Detection and Localization Using GAN and One-Class Classifier
Anomaly Detection and Localization  Using GAN and One-Class ClassifierAnomaly Detection and Localization  Using GAN and One-Class Classifier
Anomaly Detection and Localization Using GAN and One-Class Classifier
 
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
 
Brief intro : Invariance and Equivariance
Brief intro : Invariance and EquivarianceBrief intro : Invariance and Equivariance
Brief intro : Invariance and Equivariance
 
Anomaly Detection with GANs
Anomaly Detection with GANsAnomaly Detection with GANs
Anomaly Detection with GANs
 

Convolution 종류 설명

  • 2. 최근 Xception, MobileNtes등에서 사용되는 다양한 convolution 기술 중 일반적인 convolution, Pointwise convolution (1x1 convolution)과 depthwise convolution의 차이는 ? 목적 : CNN의 계산량 및 매개변수 수를 줄임으로써 Xception은 큰 이미지 인식의 고속화 MobileNets은 정도를 유지하면서 Networks의 경량화
  • 3. Pointwise convolution과 depthwise convolution의 장점을 이해하기 위해, 우선 일반 convolution의 계산량 및 parameter 수에 대해 생각해보면 어떤 CNN에 대한 입력 특징 맵의 크기를 FxF, 입력 채널 수를 N, 커널 크기를 KxK, 출력 채널 수를 M으로 하면, 이 CNN의 계산량은 F2NK2M이 된다.
  • 4. 이것은 입력 특징 맵 1개당 Convolution의 cost가 K2N으로 이를 입력 특징 맵 F2 개에 적용해서 1 채널의 출력 특성 맵이 생성되기 때문에, 출력 특징 맵이 M개 경우에는 위의 계산과 같다. parameter 수가 K2N의 Convolution이 M종류이기 때문에, K2NM이 된다.
  • 5. Pointwise convolution Pointwise convolution은 ResNet등의 skip connection에도 이용되는 1x1 convolution이다. 공간 방향의 convolution은 실시하지 않고, 채널 방향에만 convolution을 한다. 특징 맵의 차원을 늘리거나 줄일 때 이용된다. Pointwise convolution은 일반 convolution에서 K = 1로 한 것이기 때문에, 계산량은 F2NM, parameter 수는 NM이 된다.
  • 6. Depthwise convolution Depthwise convolution는 특징맵 채널마다 각각 공간 방향의 convolution 을 수행한다. 채널 방향에 convolution을 수행하지 않기 때문에 일반 convolution 1회의 cost가 K2N에서 K2로 되므로 CNN의 계산량은 F2NK2, parameter 수는 K2N이 된다.
  • 7. 일반적인 convolution이 특징 맵의 공간 방향 및 채널 방향으로 동시에 convolution 을 실 시 하 는 반 면 , 채 널 방 향 의 convolution(pointwise convolution)과 공간 방향의 convolution (depthwise convolution)을 분리 (factorize)해서 따로 계산한 후 후에 합쳐서 적용하여 공간 방향 및 채널 방 향을 동시에 convolution하는 convolution보다 적은 parameter 및 계산량으 로 근사 할 수있다. 계산량은 F2NK2M에서 F2NM + F2NK2로 감소된다. 비율로 말하면, 1/K2 + 1/M으로 되므로, 통상 M >> K2(e.g. K = 3, M≥32)이므 로, 계산량은 1/9 정도로 감소됨