Chapter 4 Ann
Chapter 4 Ann
Chapter 4 Ann
Engineering
Subject Code: ECE7419
By
ConvNet is not just a deep neural network (special type of feed forward neural
network) that has many hidden layers. It is a deep network that imitates how the
visual cortex of the brain processes and recognizes images..
ASTU
3
ASTU
Basically, image recognition is the classification. For example, recognizing
whether the image of a picture is a cat or a dog is the same as classifying the image
into a cat or dog class.
The same thing applies to the letter recognition; recognizing the letter from an
image is the same as classifying the image into one of the letter classes. Therefore,
the output layer of the ConvNet generally employs the multiclass classification
neural network.
Weight Initialization
Weight Initialization ,the way that the weights of neural net-works will be initialized
is very important, and it can determine whether the algorithm converges at all, with
some initial points being so unstable that the algorithm encounters numerical
difficulties and fails altogether .
Most of the time, the weights are initialized randomly from a Gaussian or uniform
distribution. Balances between all the layers to have the same activation variance
and the same gradient variance. More formally the weights are initialized as:
Concepts of Convolutional Neural Network (CNN)
The padding is important to give border size information of the input image more
importance, otherwise without using any padding the border side features are gets
washed away too quickly.
The Fig.9 gives an example by showing the convolution operation with Zero-padding
and 3 stride value.
Fig.9
Pooling Layer
The pooling2 layers are used to sub-sample the feature maps (produced after
convolution operations), i.e. it takes the larger size feature maps and shrinks them
to lower sized feature maps.
While shrinking the feature maps it always preserve the most dominant features (or
information) in each pool steps. The pooling operation is performed by specifying
the pooled region size and the stride of the operation, similar to convolution
operation.
There are different types of pooling techniques are used in different pooling layers
such as:
Max pooling, min pooling, average pooling, gated pooling, tree pooling, etc. Max
Pooling is the most popular and mostly used pooling technique.
The main drawback of pooling layer is that it sometimes decreases the overall
performance of CNN. The reason behind this is that pooling layer helps CNN to
find whether a specific feature is present in the given input image or not without
caring about the correct position of that feature.
The whole CNN
cat dog ……
Convolution
Max Pooling
Max Pooling
Flattene A new
d image
Examples:
Divided Pixels (5x5) Divided level (value)(5x5
Image:
23 ASTU
Examples conti…
Convolution:
24 ASTU
Feature map for Filter 1
Problem with stride 1 (move) [ repeating the same pixel more times so it reduce
the in formation:
25 ASTU
Examples: Contin…
Without Padding:
26 ASTU
Examples: contin..
Max
Features
images
after
pooling
27 ASTU
Pooling features image converted to column (Flattened) and will apply to
Classification network.
28 ASTU
Add the maximum value in training output and add the value of new input corresponding to max
value of training out put. Find the percentage (If percentage is > 90% meanse the new input is close
to train input.
29 ASTU
Example: Lastly, let’s investigate how the image is processed while it passes through
the convolution layer and pooling layer. The original dimension of the MNIST image
is 28 x28. Once the image is processed with the 9x9 convolution filter, it becomes a
20x20 feature map. As we have 20 convolution filters, the layer produces 20 feature
maps. Through the 2x2 mean pooling process, the pooling layer shrinks each feature
map to a 10x10 map.
There are various architectures of CNNs available which have been key in
building algorithms which power and shall power AI as a whole in the
foreseeable future. Some of them have been listed below:
LeNet
AlexNet
VGGNet
GoogLeNet
ResNet
ZFNet
33
ASTU