SlideShare una empresa de 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 정도로 감소됨

Más contenido relacionado

La actualidad más candente

introduction to double deep Q-learning
introduction to double deep Q-learningintroduction to double deep Q-learning
introduction to double deep Q-learningWEBFARMER. ltd.
 
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会Shotaro Sano
 
오토인코더의 모든 것
오토인코더의 모든 것오토인코더의 모든 것
오토인코더의 모든 것NAVER Engineering
 
Densely Connected Convolutional Networks
Densely Connected Convolutional NetworksDensely Connected Convolutional Networks
Densely Connected Convolutional NetworksHosein Mohebbi
 
音声生成の基礎と音声学
音声生成の基礎と音声学音声生成の基礎と音声学
音声生成の基礎と音声学Akinori Ito
 
論文紹介 Pixel Recurrent Neural Networks
論文紹介 Pixel Recurrent Neural Networks論文紹介 Pixel Recurrent Neural Networks
論文紹介 Pixel Recurrent Neural NetworksSeiya Tokui
 
인공신경망
인공신경망인공신경망
인공신경망종열 현
 
Pixel RNN to Pixel CNN++
Pixel RNN to Pixel CNN++Pixel RNN to Pixel CNN++
Pixel RNN to Pixel CNN++Dongheon Lee
 
CONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORKCONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORKMd Rajib Bhuiyan
 
Moment matching networkを用いた音声パラメータのランダム生成の検討
Moment matching networkを用いた音声パラメータのランダム生成の検討Moment matching networkを用いた音声パラメータのランダム生成の検討
Moment matching networkを用いた音声パラメータのランダム生成の検討Shinnosuke Takamichi
 
[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)Donghyeon Kim
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명홍배 김
 
[study] pointer networks
[study] pointer networks[study] pointer networks
[study] pointer networksGyuhyeon Nam
 
머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)ssusercdf17c
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRUananth
 
Enabling Power-Efficient AI Through Quantization
Enabling Power-Efficient AI Through QuantizationEnabling Power-Efficient AI Through Quantization
Enabling Power-Efficient AI Through QuantizationQualcomm Research
 
文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection
文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection
文献紹介:Temporal Convolutional Networks for Action Segmentation and DetectionToru Tamaki
 

La actualidad más candente (20)

introduction to double deep Q-learning
introduction to double deep Q-learningintroduction to double deep Q-learning
introduction to double deep Q-learning
 
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
 
오토인코더의 모든 것
오토인코더의 모든 것오토인코더의 모든 것
오토인코더의 모든 것
 
Densely Connected Convolutional Networks
Densely Connected Convolutional NetworksDensely Connected Convolutional Networks
Densely Connected Convolutional Networks
 
音声生成の基礎と音声学
音声生成の基礎と音声学音声生成の基礎と音声学
音声生成の基礎と音声学
 
그림 그리는 AI
그림 그리는 AI그림 그리는 AI
그림 그리는 AI
 
論文紹介 Pixel Recurrent Neural Networks
論文紹介 Pixel Recurrent Neural Networks論文紹介 Pixel Recurrent Neural Networks
論文紹介 Pixel Recurrent Neural Networks
 
ViT.pptx
ViT.pptxViT.pptx
ViT.pptx
 
인공신경망
인공신경망인공신경망
인공신경망
 
Pixel RNN to Pixel CNN++
Pixel RNN to Pixel CNN++Pixel RNN to Pixel CNN++
Pixel RNN to Pixel CNN++
 
CONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORKCONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORK
 
Moment matching networkを用いた音声パラメータのランダム生成の検討
Moment matching networkを用いた音声パラメータのランダム生成の検討Moment matching networkを用いた音声パラメータのランダム生成の検討
Moment matching networkを用いた音声パラメータのランダム生成の検討
 
[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명
 
[study] pointer networks
[study] pointer networks[study] pointer networks
[study] pointer networks
 
머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
Enabling Power-Efficient AI Through Quantization
Enabling Power-Efficient AI Through QuantizationEnabling Power-Efficient AI Through Quantization
Enabling Power-Efficient AI Through Quantization
 
文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection
文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection
文献紹介:Temporal Convolutional Networks for Action Segmentation and Detection
 
Lecture7 - IBk
Lecture7 - IBkLecture7 - IBk
Lecture7 - IBk
 

Destacado

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홍배 김
 
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홍배 김
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)홍배 김
 
딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향홍배 김
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)홍배 김
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization홍배 김
 

Destacado (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
 
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
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)
 
딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization
 

Más de 홍배 김

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홍배 김
 
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홍배 김
 

Más de 홍배 김 (14)

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
 
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 정도로 감소됨