SlideShare a Scribd company logo
Feedback
Interaction Lab. Kumoh National Institute of Technology
Deep Learning from Scratch
chapter 7. CNN
JaeYeop Jeong
■Intro
■Convolution Layer
■Pooling Layer
■Implement
■Visualization
Agenda
Interaction Lab., Kumoh National Institue of Technology 3
■Previous neural network
 Fully-connected : Affine layer
• Combines with all neurons in adjacent layers
Intro
Interaction Lab., Kumoh National Institue of Technology 4
■Problem of previous neural network
 Data is ignored
• Image consists of width, height, and channel 3D information
• Flatten 3-D data into 1-D data
Intro
Interaction Lab., Kumoh National Institue of Technology 5
■Convolution Neural Network
 Plus Convolution layer and Pooling Layer
• Use 3-D data
■ Advantage of data shape
Intro
Interaction Lab., Kumoh National Institue of Technology 6
■Convolution operation
 Convolution layer
• Filter window
• Bias : 1 x 1
• Weight : filter parameter
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 7
Input Filter Bias Output
■Convolution operation
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 8
■Padding
 Fills around the data with specific values
 Resize the output to large
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 9
(4, 4)
Padding : 1
(3, 3)
Filter
(4, 4)
Output
■Stride
 Stride : 2
 Resize the output to small
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 10
■ Stride and Padding
 Input : (H, W), padding : P, stride : S, filter : (FH, FW)
• 𝑂𝐻 =
𝐻+2𝑃 −𝐹𝐻
𝑆
+ 1
• 𝑂𝑊 =
𝑊+2𝑃 −𝐹𝑊
𝑆
+ 1
 Input : (4, 4), padding : 1, stride : 1, filter : (3, 3)
• 𝑂𝐻 =
4+2 ∗1 −3
1
+ 1 = 4
• 𝑂𝑊 =
4+2 ∗1 −3
1
+ 1 = 4
 Input : (7, 7), padding : 0, stride : 2, filter : (3, 3)
• 𝑂𝐻 =
7+2 ∗0 − 3
2
+ 1 = 3
• 𝑂𝑊 =
7+2 ∗0 − 3
2
+ 1 = 3
 Input : (28, 31), padding : 2, stride : 3, filter : (5, 5)
• 𝑂𝐻 =
28 + 2 ∗ 2 − 5
5
+ 1 = 10
• 𝑂𝑊 =
31 + 2 ∗ 2 −5
5
+ 1 = 11
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 11
Value must be integer
■3-D data convolution
 Plus channel
• Input channel = filter channel
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 12
■3-D data convolution
 Output with multiple channels
• Use multiple filters
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 13
■Batch
 3-D data -> 4-D data
• (H, W, C) -> (Data, H, W, C)
 Convolution operation on n data
Convolution Layer
Interaction Lab., Kumoh National Institue of Technology 14
■Pooling layer
 Not use all data
• Pooling window = size of stride
■ 2 x 2 window 2 stride
■ 3 x 3 window 3 stride
■ 4 x 4 window 4 stride
Pooling Layer
Interaction Lab., Kumoh National Institue of Technology 15
2 x 2
window
■Pooling layer
 No parameter for training
 Not change channel size
 Stable
Pooling Layer
Interaction Lab., Kumoh National Institue of Technology 16
■Im2col
 Not use for loop
• Performance : numpy
Implement
Interaction Lab., Kumoh National Institue of Technology 17
input
4-D data to 2-D data
Filter application order
Implement
Interaction Lab., Kumoh National Institue of Technology 18
Q&A

More Related Content

PPTX
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
PPTX
deep learning from scratch chapter 5.learning related skills
PPTX
deep learning from scratch chapter 4.neural network learing
PDF
Dual Learning for Machine Translation (NIPS 2016)
PPTX
hands on machine learning Chapter 4 model training
PDF
One-Pass Data Science In Apache Spark With Generative T-Digests with Erik Erl...
PDF
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
PDF
ddpg seminar
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
deep learning from scratch chapter 5.learning related skills
deep learning from scratch chapter 4.neural network learing
Dual Learning for Machine Translation (NIPS 2016)
hands on machine learning Chapter 4 model training
One-Pass Data Science In Apache Spark With Generative T-Digests with Erik Erl...
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
ddpg seminar

What's hot (20)

PDF
Progressive identification of true labels for partial label learning
PDF
Self similarity student for partial label histopathology image segmentation
PPTX
Sim-to-Real Transfer in Deep Reinforcement Learning
PDF
Genetic programming
PDF
Probabilistic Collaborative Filtering with Negative Cross Entropy
PDF
Decision Forests and discriminant analysis
PDF
Smart Scalable Feature Reduction with Random Forests with Erik Erlandson
PDF
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
PPTX
A multilevel automatic thresholding method based on a genetic algorithm for a...
PPTX
Mlp mixer an all-mlp architecture for vision
PPTX
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
PDF
safe and efficient off policy reinforcement learning
PDF
Two methods for optimising cognitive model parameters
PPTX
Optimization Shuffled Frog Leaping Algorithm
PDF
Caching strategies for in memory neighborhood-based recommender systems
PPTX
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
PDF
The Power of Ensembles in Machine Learning
PPT
A scalable collaborative filtering framework based on co clustering
PDF
Handling Missing Attributes using Matrix Factorization 
PDF
Adversarial Reinforced Learning for Unsupervised Domain Adaptation
Progressive identification of true labels for partial label learning
Self similarity student for partial label histopathology image segmentation
Sim-to-Real Transfer in Deep Reinforcement Learning
Genetic programming
Probabilistic Collaborative Filtering with Negative Cross Entropy
Decision Forests and discriminant analysis
Smart Scalable Feature Reduction with Random Forests with Erik Erlandson
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
A multilevel automatic thresholding method based on a genetic algorithm for a...
Mlp mixer an all-mlp architecture for vision
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
safe and efficient off policy reinforcement learning
Two methods for optimising cognitive model parameters
Optimization Shuffled Frog Leaping Algorithm
Caching strategies for in memory neighborhood-based recommender systems
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
The Power of Ensembles in Machine Learning
A scalable collaborative filtering framework based on co clustering
Handling Missing Attributes using Matrix Factorization 
Adversarial Reinforced Learning for Unsupervised Domain Adaptation
Ad

Similar to deep learning from scratch chapter 7.cnn (20)

PDF
Hardware Acceleration for Machine Learning
PPTX
Convolutional Neural Networks
PPTX
PPTX
Ieek fall Conference 2013
PDF
Image classification with neural networks
PDF
ShuffleNet - PR054
PPTX
deep learning from scratch chapter 3 neural network
PPT
2.2_Dynamic Testing: White Box Testing Techniques.ppt
PPTX
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
PPTX
Computing Just What You Need: Online Data Analysis and Reduction at Extreme ...
PPTX
B.tech_project_ppt.pptx
PPTX
Waste Classification System using Convolutional Neural Networks.pptx
PDF
ODVSML_Presentation
PPTX
Optimization of Continuous Queries in Federated Database and Stream Processin...
PPTX
Neural network
PDF
Artificial Neural Networks (ANNS) For Prediction of California Bearing Ratio ...
PPTX
Cvpr 2018 papers review (efficient computing)
PPTX
Final Presentation (REVISION 2)
PDF
Controlled dropout: a different dropout for improving training speed on deep ...
PPTX
Introduction to CNN Models: DenseNet & MobileNet
Hardware Acceleration for Machine Learning
Convolutional Neural Networks
Ieek fall Conference 2013
Image classification with neural networks
ShuffleNet - PR054
deep learning from scratch chapter 3 neural network
2.2_Dynamic Testing: White Box Testing Techniques.ppt
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
Computing Just What You Need: Online Data Analysis and Reduction at Extreme ...
B.tech_project_ppt.pptx
Waste Classification System using Convolutional Neural Networks.pptx
ODVSML_Presentation
Optimization of Continuous Queries in Federated Database and Stream Processin...
Neural network
Artificial Neural Networks (ANNS) For Prediction of California Bearing Ratio ...
Cvpr 2018 papers review (efficient computing)
Final Presentation (REVISION 2)
Controlled dropout: a different dropout for improving training speed on deep ...
Introduction to CNN Models: DenseNet & MobileNet
Ad

More from Jaey Jeong (10)

PPTX
Improving accuracy of binary neural networks using unbalanced activation dist...
PPTX
Gaze estimation using transformer
PPTX
Unsupervised representation learning for gaze estimation
PPTX
핵심 딥러닝 입문 4장 RNN
PPTX
Neural networks for semantic gaze analysis in xr settings
PPTX
Gaze supported 3 d object manipulation in virtual reality
PPTX
Deep learning based gaze detection system for automobile drivers using nir ca...
PPTX
Appearance based gaze estimation using deep features and random forest regres...
PPTX
Tablet gaze unconstrained appearance based gaze estimation in mobile tablets
PPTX
deep learning from scratch chapter 6.backpropagation
Improving accuracy of binary neural networks using unbalanced activation dist...
Gaze estimation using transformer
Unsupervised representation learning for gaze estimation
핵심 딥러닝 입문 4장 RNN
Neural networks for semantic gaze analysis in xr settings
Gaze supported 3 d object manipulation in virtual reality
Deep learning based gaze detection system for automobile drivers using nir ca...
Appearance based gaze estimation using deep features and random forest regres...
Tablet gaze unconstrained appearance based gaze estimation in mobile tablets
deep learning from scratch chapter 6.backpropagation

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
history of c programming in notes for students .pptx
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Cost to Outsource Software Development in 2025
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
assetexplorer- product-overview - presentation
PDF
AutoCAD Professional Crack 2025 With License Key
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Design an Analysis of Algorithms II-SECS-1021-03
Operating system designcfffgfgggggggvggggggggg
Reimagine Home Health with the Power of Agentic AI​
17 Powerful Integrations Your Next-Gen MLM Software Needs
Why Generative AI is the Future of Content, Code & Creativity?
Download FL Studio Crack Latest version 2025 ?
Navsoft: AI-Powered Business Solutions & Custom Software Development
history of c programming in notes for students .pptx
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Wondershare Filmora 15 Crack With Activation Key [2025
Cost to Outsource Software Development in 2025
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Design an Analysis of Algorithms I-SECS-1021-03
Designing Intelligence for the Shop Floor.pdf
assetexplorer- product-overview - presentation
AutoCAD Professional Crack 2025 With License Key

deep learning from scratch chapter 7.cnn

  • 2. Interaction Lab. Kumoh National Institute of Technology Deep Learning from Scratch chapter 7. CNN JaeYeop Jeong
  • 4. ■Previous neural network  Fully-connected : Affine layer • Combines with all neurons in adjacent layers Intro Interaction Lab., Kumoh National Institue of Technology 4
  • 5. ■Problem of previous neural network  Data is ignored • Image consists of width, height, and channel 3D information • Flatten 3-D data into 1-D data Intro Interaction Lab., Kumoh National Institue of Technology 5
  • 6. ■Convolution Neural Network  Plus Convolution layer and Pooling Layer • Use 3-D data ■ Advantage of data shape Intro Interaction Lab., Kumoh National Institue of Technology 6
  • 7. ■Convolution operation  Convolution layer • Filter window • Bias : 1 x 1 • Weight : filter parameter Convolution Layer Interaction Lab., Kumoh National Institue of Technology 7 Input Filter Bias Output
  • 8. ■Convolution operation Convolution Layer Interaction Lab., Kumoh National Institue of Technology 8
  • 9. ■Padding  Fills around the data with specific values  Resize the output to large Convolution Layer Interaction Lab., Kumoh National Institue of Technology 9 (4, 4) Padding : 1 (3, 3) Filter (4, 4) Output
  • 10. ■Stride  Stride : 2  Resize the output to small Convolution Layer Interaction Lab., Kumoh National Institue of Technology 10
  • 11. ■ Stride and Padding  Input : (H, W), padding : P, stride : S, filter : (FH, FW) • 𝑂𝐻 = 𝐻+2𝑃 −𝐹𝐻 𝑆 + 1 • 𝑂𝑊 = 𝑊+2𝑃 −𝐹𝑊 𝑆 + 1  Input : (4, 4), padding : 1, stride : 1, filter : (3, 3) • 𝑂𝐻 = 4+2 ∗1 −3 1 + 1 = 4 • 𝑂𝑊 = 4+2 ∗1 −3 1 + 1 = 4  Input : (7, 7), padding : 0, stride : 2, filter : (3, 3) • 𝑂𝐻 = 7+2 ∗0 − 3 2 + 1 = 3 • 𝑂𝑊 = 7+2 ∗0 − 3 2 + 1 = 3  Input : (28, 31), padding : 2, stride : 3, filter : (5, 5) • 𝑂𝐻 = 28 + 2 ∗ 2 − 5 5 + 1 = 10 • 𝑂𝑊 = 31 + 2 ∗ 2 −5 5 + 1 = 11 Convolution Layer Interaction Lab., Kumoh National Institue of Technology 11 Value must be integer
  • 12. ■3-D data convolution  Plus channel • Input channel = filter channel Convolution Layer Interaction Lab., Kumoh National Institue of Technology 12
  • 13. ■3-D data convolution  Output with multiple channels • Use multiple filters Convolution Layer Interaction Lab., Kumoh National Institue of Technology 13
  • 14. ■Batch  3-D data -> 4-D data • (H, W, C) -> (Data, H, W, C)  Convolution operation on n data Convolution Layer Interaction Lab., Kumoh National Institue of Technology 14
  • 15. ■Pooling layer  Not use all data • Pooling window = size of stride ■ 2 x 2 window 2 stride ■ 3 x 3 window 3 stride ■ 4 x 4 window 4 stride Pooling Layer Interaction Lab., Kumoh National Institue of Technology 15 2 x 2 window
  • 16. ■Pooling layer  No parameter for training  Not change channel size  Stable Pooling Layer Interaction Lab., Kumoh National Institue of Technology 16
  • 17. ■Im2col  Not use for loop • Performance : numpy Implement Interaction Lab., Kumoh National Institue of Technology 17 input 4-D data to 2-D data Filter application order
  • 18. Implement Interaction Lab., Kumoh National Institue of Technology 18
  • 19. Q&A