In the last session on machine learning we learnt advanced trends in machine learning and artificial intelligence.
In today’s tutorial on machine learning we will discuss a very important and advanced library called Keras. (k-ras) This library is used in deep learning and deep learning is one of the special, specialized branches of machine learning.
So let us understand what keras is and what deep learning is. Keras is an API meaning application program interface and this has been devised for you and me meaning it has been made for human beings.
Sometimes we get confused as to whether it is made for machine learning, no, no when we want to make applications for deep learning then basically we use Keras.
So let us understand it in some more detail. So, Keras reduces the cognitive workload, meaning the way our brain works or the neural network inside us works, the neural cells that are there and the way they work, exactly the same mimic, exactly the same implementation is done by Keras.
It provides us consistent and simple API’s and when we develop code with Keras and when you compare it then you understand that the number of lines in code get reduced as compared to some other module that we are making and there is one more thing that it gives very clear and actionable error messages because of which it becomes easy to build the model and to debug the error becomes easy.
So let us see how this Keras was actually made. Keras takes the help of tensor flow, theano and microsoft cognitive toolkit.
So these libraries help Keras to make neural networks or artificial neural networks. Now you must be thinking that I am talking of neurons, I am talking of neural networks and basically what this would be ,this is what you must be thinking. So this also I will explain to you in a very clear manner.
As we saw numpy(num-pie) which is a library that deals with numbers , so anything in this world that you see we have to give it in number form to the computer meaning that even if you are seeing an image the image could be a RGB image , so RGB, you must have heard RGB, red green blue , so you will see that R color has a number , G color will also have a numeric value and blue color will also have a numeric value , so for a every single pixel that you see we can take three values of RGB respectively and if for the whole image we take such values for all pixels , so what will happen, the complete picture will be converted into a number format.
In the same way a video is a group of images, sound can also be captured in numerical format So everything that we see that we feel that we experience and when we want to convert into digital form then for digital conversion when we apply deep learning and machine learning so that we convert into numerical format, so in tensorflow, tensor is basically that numerical format or data format and theano gives us many capabilities to perform mathematical operations and microsoft cognitive toolkit also provide us many modules with which we can do so many things for computer vision , so these libraries help and support and help Keras in the backend. Now let us move further and understand what deep learning is.
To understand deep learning, understanding biological neurons is very necessary and here I will first give you an example.
If you have ever entered the kitchen and touched a hot cooker or plate so you know what happens, the moment you touch it , the hand quickly lifts up , but why does this hand quickly lifts up , have you ever thought of it, I am sure you must have thought also and read also , so come let us revise it.
So anytime when you get an electric shock or a thorn prick or we touch a warm hot plate , at that moment an action is performed which we call reflex action.
This reflex action is performed because in our hands, in our hands there are cells everywhere and these are some special cells that I am talking about and these are neurons or neural cells that I am talking about.
These neural cells are so active that have you ever thought that on touching a hot plate you are thinking that whether I should remove my hand or not, remove my hand or not and your hand is burning, this we never think, right, never think because the brain does not have to get involved in this manner, in this active manner , you just touch your hand and immediately there is a reflex action, so the complete responsibility of executing this task is that of the neurons , the hundreds of neuron cells that touched or received the stimuli on touching the hot plate, and those hundred of neuron cells passed that message to the hundreds or thousand of more neuron cells connected to it, and those also passed the message ahead, and those also passed it ahead and finally a command was given to the muscles that lift your hand back.
So this quick solution was produced by them, by biological neurons, and from this only we got an inspiration that why not create an artificial neural network because this is also a problem solving method , so deep learning is this particular area and it is a specialized part of machine learning where taking inspiration from biological neurons we make artificial neurons.
So let us now understand biological neurons. In this diagram you can see that this is a neuron and in this neuron you can see that fat thing here is the cell body and there is a tail like thing at the back which is called axon (akzon) and from here only the messages are transmitted , so the moment you touch, so the moment you touch the heat , or the hot surface you touched , is it the heat that is passed, no, not at all, that heat activates the cell because if heat would have been passed then your hand from here to her would have become hot but that does not happen, it is only the surface that gets heated , and only that surface burns meaning what is the message these cells are sending back , it is an electrical impulse which is a message that the cells are sending back , it is electrical impulse that they are sending , so this electrical impulse goes through this tail , so one cell quickly, means this axon quickly sends the message in microseconds , and in microseconds thousands of neurons are sent this message , so this is how quickly a biological neuron takes action.
And taking inspiration from this, a structure of this artificial neural network was created.
First of all input, from where input comes are these layers in yellow color and after receiving the input there are many layers of cells in between and we call them hidden layers and then there is an output layer from where output is received , in case of humans the muscles lift back the hand and this is a reflex action, so here also there will be a output and so in the manner that this implementation is done is called artificial neural network and Keras helps us in making this.
If you have any queries or comments, click the discussion button below the video and post there. This way, you will be able to connect to fellow learners and discuss the course. Also, Our Team will try to solve your query.
Ruturaj Nivas Patil
Very well explained in entire course. Great course for everyone as it takes from scratch to advance level.