4. What is a Neural Network?
An artificial neural network learning algorithm, or neural
network, or just neural net
, is a computational learning system that uses a network of
functions to understand and translate a data input of one
form into a desired output, usually in another form. The
concept of the artificial neural network was inspired by
human biology and the way neurons of the human brain
function together to understand inputs from human senses.
5. Introduction to CNN (convolutional neural network):
When it comes to Machine Learning, Artificial Neural
Networks perform really well. Artificial Neural Networks are
used in various classification task like image, audio, words.
Different types of Neural Networks are used for different
purposes, for example for predicting the sequence of words we
use Recurrent Neural Networks more precisely an LSTM,
similarly for image classification we use Convolution
Neural Network. In this blog, we are going to build basic
building block for CNN.
6. The term “convolutional” means mathematical function
derived by integration from two distinct functions. It includes
rolling different elements together into a coherent whole by
multiplying them. Convolution describes how the other
function influences the shape of one function. In other words,
it is all about the relations between elements and their
operation as a whole.
8. CNN is a specialized kind of neural network for
processing data that has a known, grid-like topology,
such as time-series (1D grid) , image data (2D grid)
CNN is a deep learning algorithm, it is used in
various fields like speech recognition, image retrieval
and face recognition.
10. Input Layers: It’s the layer in which we give input to our model. The
number of neurons in this layer is equal to total number of features in our
data (number of pixels incase of an image).
Hidden Layer: The input from Input layer is then feed into the hidden
layer. There can be many hidden layers depending upon our model and
data size. Each hidden layers can have different numbers of neurons
which are generally greater than the number of features. The output from
each layer is computed by matrix multiplication of output of the previous
layer with learnable weights of that layer and then by addition of learnable
biases followed by activation function which makes the network nonlinear.
Output Layer: The output from the hidden layer is then fed into a logistic
function like sigmoid or softmax which converts the output of each class
into probability score of each class.
11. Here’s the basic python code for a neural network
with random inputs and two hidden layers.
activation = lambda x: 1.0/(1.0 + np.exp(-x)) # sigmoid
input = np.random.randn(3, 1)
hidden_1 = activation(np.dot(W1, input) + b1)
hidden_2 = activation(np.dot(W2, hidden_1) + b2)
output = np.dot(W3, hidden_2) + b3
13. Typical CNN has an architecture consists of :
1) Convolution layer
2) Pooling layer
3) Connected layer.
14. Convolution layer:
•Extract the unique features from the input image.
•Preservers the spatial relationship between pixels
by learning image features using small squares of
•Detect small ,meaningful features such as edges
•(i.e., identifying elements of an object, the face of
certain man, etc.).
17. Then goes Rectified Linear Unit layer (aka ReLu).
This layer is an extension of a convolutional layer.
The purpose of ReLu is to increase the non-linearity
of the image. It is the process of stripping an image
of excessive fat to provide a better feature extraction.
18. Pool Layer:
•In all cases, pooling helps to make the representation
become approximately invariant to small translations of
•Local translation can be very useful property if we care
more about whether some feature is present than exactly
where it is.
24. The connected layer is a standard feed-forward
neural network. It is a final straight line before the
finish line where all the things are already evident.
And it is only a matter of time when the results are
29. Some of the key applications of CNN are listed here –
•Decoding Facial Recognition
•Historic and environmental collections
30. Other Interesting Fields
CNNs are poised to be the future with their introduction into
driverless cars, robots that can mimic human behavior, aides
to human genome mapping projects, predicting earthquakes
and natural disasters, and maybe even self-diagnoses of
medical problems. So, you wouldn't even have to drive down
to a clinic or schedule an appointment with a doctor to
ensure your sneezing attack or high fever is just the simple
flu and not symptoms of some rare disease. One problem
that researchers are working on with CNNs is brain cancer
detection. The earlier detection of brain cancer can prove to
be a big step in saving more lives affected by this illness.