Posts

Activation Functions in Neural Networks

Image
What are Activation Functions ? Activation Function of a neuron defines the output of that neuron given a sets of inputs. They are biologically similar to the activities in our brain, where different neurons are activated by different stimuli. For example:    A cake will activate some set of neurons (something pleasant) in the brain whereas, a garbage can will activate some other set of neurons (something unpleasant). Activation Functions are really important for a Artificial Neural Network to learn and make sense of something really complicated and Non-linear complex functional mappings between the inputs and response variable.  They  introduce non-linear properties to our Network . Their main purpose is to convert a input signal of a node in a A-NN to an output signal.  That output signal now is used as a input in the next layer in the stack. Is it necessary to have an Activation function? The answer is YES!   If we do not apply a Acti...

Recurrent Neural Networks and LSTM explained

Image
What are Recurrent Neural Networks ? Recurrent Neural Networks are the state of the art algorithm for sequential data  This is because it is the first algorithm that remembers its input, due to an internal memory, which makes it perfectly suited for Machine Learning problems that involve sequential data.   In simple terms, they are networks with loops in them, allowing information to be saved. Here, A is the network, Xt is the input with output  ht.  Although, these loops makes the RNN kind of hard to interpret, but in reality it is very simple. This is how the RNN looks when we unroll them. A RNN can be thought of as multiple copies of the same network , each passing message to  the next. Because of their internal memory, RNN’s are able to remember important things about the input they received, which enables them to be very precise in predicting what’s coming next. This is the reason why they are the preferred algorithm for se...

Image Classification - Convolutional Neural Network using Keras

Image
Aim: The main purpose of this project is to classify images using Convolutional Neural Network. For this, the cat vs dog dataset will be used, which has 8000 training images (4000 each) and 2000 test images . 2 methods will be used and compared: a. Normal feed forward CNN b. Data (Image) Augmentation technique. To learn about how Convolutional neural network works,   Click here Data Augmentation explaination: This method works very well when the dataset is small, i.e. very less images to train our neural network. Just like our cat vs dog dataset, which has only 4000 images of dogs and cats each. In order to increase our training samples we can scrape through the internet collecting images. But this is very boring and expensive. Enter Data Augmentation technique, which does the work for us. It increases our training samples in very less time. Data/Image augmentation is the process of taking the images that are already in our training dataset and manipulating th...

Convolutional Neural Network Explained

Image
What are Convolutional Neural Networks ? Convolutional neural network  ( CNN , or  ConvNet ) is a class of deep,  feed-forward   artificial neural networks  that has successfully been applied to analyzing visual imagery. ConvNets have been successful in identifying faces, objects and traffic signs apart from powering vision in robots and self driving cars. The working of a CNN is very simple. We have an input image that goes into the convolutional neural network and then we get the output in the form of class labels. Example: This CNN has been trained to recognize facial expressions. As you can see, when there is a happy face, the CNN will output as happy and vice versa. The CNN works on the features of each image. After training it is able to give probabilities of each target class, i.e. say 80% happy or 90% sad.  How does a neural network able to recognize the features? Lets say we have a black & white image of  2x2 pixe...