Дълбоко обучение с Tensorflow
Лекция 5. Конволюционни невронни мрежи
Lecture 5
Convolutional Neural Nets
Agenda
What Can CNNs Do?
Image Classification
Object Detection
`Neural Style Transfer
`Neural Style Transfer
Face Recognition
Why CNNs?
Different lighting, contrast, viewpoints
Number of Parameters
Traditional Approaches
Traditional Approaches
CNN Basics
CNN Principles
WbWhat Is a CNN?
What is a Convolution?
Convolution Operation
Convolution Operation
0×0+1×1+3×2+4×3=19
Parameters Defining Convolution
Convolutions are defined by two key parameters:
Main Concepts Behind Convolutional Neural Networks
Weight Sharing
Edge Detection Example
How Do We Choose the Weights of the Filters?
We use Gradient Descent and Backpropagation to find the optimal weights of the different filters.
Padding
Padding
Padding
Some padding terminologies:
Stride
Stride of 2 Example
Pooling
Pooling
Size Before and After Convolutions
Convolutions with Color Channels
Convolutions with Color Channels
Convolving 6X6X3 with 3X3X3 gives you a 4X4 2D output
Convolutions with Color Channels
Convolution Operation with Multiple Filters
Convolution Operation with Multiple Filters
One Convolution Layer
Finally to make up a convolution layer, a bias is added and an activation function such as ReLU or tanh is applied.
One Convolution Layer Number of Parameters
One Convolution Layer Number of Parameters
If you have 10 filters 3x3x3 how many parameters do you have in this layer?
Weights = 3*3*3 = 27
Bias = 1
Total parameters per filter = 28
Total Params for 10 Filters = 10 * 28 = 280 params
Basic CNN Architecture
Le Net CNN Architecture
Handwritten digit recognition, developed by Yann Lecun in the 90s.
At a high level, LeNet (LeNet-5) consists of two parts: (i) a convolutional encoder consisting of two convolutional layers; and (ii) a dense block consisting of three fully connected layers;
The basic units in each convolutional block are a convolutional layer, a sigmoid activation function, and a subsequent average pooling operation.
Note that while ReLUs and max-pooling work better, these discoveries had not yet been made at the time.
Each convolutional layer uses a 5×5 kernel.
Hidden Layers
Le Net
Le Net
Illustrated Example
Data Augmentation
Data Augmentation
Data Augmentation
Questions?
References