Skip to main content

CNN Layers

Reference : https://adeshpande3.github.io/adeshpande3.github.io/A-Beginner's-Guide-To-Understanding-Convolutional-Neural-Networks/

Different Layers in CNN :

A classic CNN has the following layers : Input -> Conv -> RELU -> Pool ->RELU ->Conv ->RELU -> Pool ->Fully  Connected

Convolution Layer:
First layer in convolution Neural network is always CNN. We can consider convolution as a filter/neuron/kernel. Convolution can be considered as a torch light fell on an image. The light part keep moving on the image. And this torch light is taken as a number array. When the convolution is keep moving on the image , the numbers in the image are multiplied elementary to the numbers in the torch light or FILTER. So this filter helps us to learn about the features of an image . The first convolution layers will learn about basic features like edge, curve etc. When it goes in deep it will learn about more complex features like paws, legs of dog or a pink color etc. More the number of convolution layers more we will learn about different dimensions of images.

The matrix we get by multiplying the filter with the receptive field is called - activation map.


RELU : non linear activation function

Pool layers : Eg. Max pooling. It takes the max value number from a filter . This helps to reduce the number of weights and also to reduce over fitting

Drop out Layers : This layer helps to avoid overfitting in the neural network model. This layer drops any of the weights from the network layer , hence the model become more efficient in the sense that it become more independent of some features. If some features or weights are missing also the network works fine.

Fully Connected Layers : These layers helps to map the output from the activation layer into one of the output class. That is either into the classes or gives the probability that a image will belongs to one class. 


Comments

Popular posts from this blog

List of Computer Vision APIs

Computer Vision APIs Different computer vision tools and APIs are : Google CV Watson VR Amazon R Microsoft CV Clarif.ai Cloudsight Scale https://www.scaleapi.com/image-annotation Imagga vize.ai https://vize.ai/ http://www.recognize.im/ Moodstocks ( http://www.moodstocks.com/pricing/ ) * Kooaba ( http://www.kooaba.com/en/plans_a... ) * IQ Engines ( https://www.iqengines.com/pricing/ ) * LTU technologies ( http://www.ltutech.com/ ) Camfind - Image recognition back-end for the popular app CamFind. Take advantage of the leading image recognition platform through an easy to use web API. Recognize API | Mashape - Vufind Recognize is a real-time image recognition API for classification and monetization of photos and videos. Recognize uses object recognition to uncover meaning and metadata of photos and videos for contextual image commerce and advertising. Kooaba - Our cloud-based image recognition solutions mak...

Cat Vs Dog Classification Using TensorFlow CNN

This code is copy of - https://www.kaggle.com/sentdex/full-classification-example-with-convnet/notebook - work.  I have tried this code and executed successfully. Description: The data set (training and test) are taken from Kaggle Dog vs Cat competition.  https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition/data In this the training data is encoded into an array containing the feature of each image plus its corresponding label. Functions used for this are : label_img() and create_training_data() . Similarly preprocessing is done for test data set also. The test data set images are stored as numpy array with its corresponding IDs. Function used is :process_test_data Numpy is used for preprocessing the image data into arrays. Using Tensorflow '- tflearn a DNN model is created. Here it has six convolutional layers followed by maxpool layers . Activation function used is 'RELU'. Then One fully connected layer with drop out and then softmax regression is also ...