LENET ARCHITECTURE
INTRODUCTION TO LENET
Lenet 5 was introduced in the year 1998 by Yann Lecun. Lenet is the one the oldest pretrained convolutional neural networks and state of the art of Deep learning algorithms. Lenet architecture has 5 layers, hence it is named as Lenet5.The architecture consists of convolutional layers, maxpooling layers and fully connected layers. It uses different filters and kernels to extract features from the image.
ARCHITECTURE
The input image is of dimensions 32*32*1. Here 1 represents the grace scale image, hence the number of channels in the input image is 1.Lenet architecture consists of three convolutional layers, 2 average maxpooling layers and 2 fully connected layers. The last fully connected layer acts as the output layer.It uses 3 different filters namely 6, 16, 120 to extract features from the image. It uses 2 different kernel sizes namely 2*2 & 5*5. The Kernel size 5*5 is used for convolutional layers while 2*2 is used in average maxpooling layer.It uses stride 1 for convolutional layer & stride 2 for average maxpooling layer.Lenet architecture has no padding and it uses tanh activation function for convolutional and average maxpooling layer and soft max activation function for the output layer.
n-f+2p\s+1
here,
n-input image dimensions
f-filter size
p-padding
s-stride
for first layer it is calculated as,
=
32-5+2(0)/1+1=28
n=32, f=5 , p=0, s=1
The input to the second layer is 28x28x6.Here we are
applying average maxpooling of kernel size 2x2 with stride 2 to reduce the dimensions of the image.The
output size of the image is 14x14x6.the input size given to the third layer is 14x14x6. The third
layer consists of 16 filters with kernel size of 5x5 with tanh activation
function of stride 1.The output of the third layer is of dimensions
10x10x16.The calculation is as follows,
=14-5+2(0)/1+1=10
Here,n=14,f=5,p=0,s=1
The input to the fourth layer is of size 10x10x16 .Then we are applying average maxpooling of kernel size 2x2 with stride 2 to reduce the dimensions of the image.the output size of the image is 5x5x16.The input to the fifth layer is of size 5x5x16.Again,we are applying 120 filters with kernel size of 5x5 with tanh activation function of stride. The output size of the fifth layer is 1x1x120.the sixth layer is a fully connected layer with 84 neurons .Finally there is a ouput layer with softmax activation function of 10 ouputs.
Thank you for a brief information about lenet architecture. Keep doing it.
ReplyDelete