You are on page 1of 16

Chapter 16: CNNs

Introduction
• Images –tensor with height, width and the channels (values per pixel).
• Fibre size or depth
• Element
Convolution Operation
Convolution Operation
• Local receptive field/ footprint
• Spatial filter
• Anchor/ zero point/ reference point
a) Filter
2D Pattern Matching
b) Input image
c) Feature map
d) Feature map entries with
value 3
e) Neighbourhoods of b
Convolution filters
• Hierarchical operation of filters
• CNNs find the appropriate filter using learning and backpropagation
Padding

• Input and output are of the


same width.
• Zero padding
• Thickness of the padding
depends on _______
• Rule: Every filter must have the
Multiple Convolutions same number of channels as the
tensor it’s filtering.
Multiple Convolutions

• Same footprint for each of the filters


• Two rules
• Every filter in a convolution layer must have the
same number of channels as that layer’s input
tensor.
• A convolution layer’s output tensor will have as
many channels as there are filters in the layer
• Creating a convolution layer in code
• Number of filters
• Footprint
• Padding
• Activation function
1D Convolution and 1x1 Convolution
• Sweep a filter over the input
in either height or width, but
not the other.

• Feature Reduction –reduce


the number of channels
• Compress and restructure
data on the fly
Pooling
• Advantages of changing the width and height in a tensor
Pooling

• Average pooling, max


pooling
• Helps in reducing the
memory needs and
execution time
Striding

• Strided convolutions are


faster
• Striding followed by pooling
Transposed Convolutions
• To increase the height and width,
WITHOUT changing the number of
channels
• Fractional striding/ dilated
convolution/ atrous convolution
Transposed Convolutions
Hierarchies of Filters
• Each filter at a higher level of abstraction than the previous one
• Assumptions
• Gray scale image, with 0 / 1 in each pixel
• Binary filters
• Handcrafted filters
• No padding
• Images are of size 12 x 12 only

You might also like