‫000Till Now, we have discussed the individual cell.
‫Now we are going to stack these cells to create network of cells.
‫Just to avoid confusion with biological neuron.
‫I'll be calling a neutron as Perceptrons only.
‫So Perceptron.
‫From now on means any artificial neutron.
‫Now, there are two ways we can stack sets parallely or sequentially.
‫Let's see what happens when we stack cells parallely
‫Head is a single Perceptron, the three inputs and one output.
‫No, we add another Perceptron parallel to it.
‫This cell also gets the same three input, but it has a different output.
‫Y2
‫We can keep on adding more cells parallel to these ones, maybe a third or fourth or even more than that, we'll
‫just start getting new outputs.
‫Or in other words, we can predict for multiple output using the same input features.
‫For example, when we are doing image recognition and we are trying to find out a face of a person,
‫We may also want to find the X and Y coordinate of that face in the photo
‫So these two variables will become y2 and y3
‫Although image recognition needs a much more complex network by giving this example.
‫I want to make the point that neural networks are not bound to only one output.
‫With the same input, you can get multiple output because we can do parallel stacking of the artificial
‫neurons.
‫Now, let's see.
‫Sequential stacking.
‫In the image above, we have five inputs which we input to three parallel Perceptrons.
‫Now, the output from this set of Perceptron is taken and fred as input to another set of parallel Perceptron
‫Here
‫I'm inputting the output of these three to these four Perceptrons.
‫Again, I take the four ourputs of these Perceptron and input these into this single Perceptron.
‫Lastly, this single cell is giving out one single output, which is the variable which we want to predict.
‫So this is sequential stacking in which the output of one set of parallely stack neurons is sequentially
‫given as input to the next set of parallely stacked neurons.
‫Let's first understand the benefit of doing this.
‫That is why did we not just input all the five input into a single cell and use this output to predict
‫the variable y.
‫How is stacking these additional sets of neuron helpful?
‫Let's say we have this type of data.
‫There are these two input variables.
‫Maybe height and weight.
‫Bases which we are trying to classify.
‫If the animal in the room is a cow or a dog.
‫So cows generally lie here.
‫They have more weight and more height than a dog.
‫And dogs generally lie here.
‫That is they are represented by the red dots.
‫Now, when we're classifying this set of data, we can have a linear separator that is a straight line
‫to separate these two classes.
‫Anything on the right side will be predicted as a cow.
‫And anything on the left side will be predicted as a dog.
‫This is the capability of a single Perceptron.
‫A single Perceptron can find out the best straight line to classify given data.
‫So if we have this problem.
‫Using a single Perceptron would suffice.
‫But what if the situation is more complex.
‫In fact, in real life situations, we never use neural networks when we'd need to classify for a situation
‫As simple as this.
‫The real life situations for neural networks is often more complex.
‫Let me complicate the example a little bit.
‫What if we wanted to classify objects which have this distribution?
‫So anything to the left of the first line and anything to the right of the second lane is Class a
‫or is a red dot
‫And anything in between these two lines is class b or is a green dot.
‫This type of classification situation can not be handled by a single Perceptron.
‫A network such as the one shown on the right can easily handle it.
‫For example.
‫This first neuron will fire, that is give output as one when the point lies to the left of line one.
‫And this second neuron will give output as one when the point lies to the right of line two.
‫And just final neuron, gives output as one when any one of the two inputs is one.
‫You can pause the video here.
‫Think about it for a couple of minutes and see how the small network is handling this special classification.
‫This is the power of a neural network.
‫In the network we created, each neutron can focus on a particular feature of the object and not on
‫the final output.
‫The final output will be predicted.
‫Bases the results of these features.
‫In this way, neural networks can do really sophisticated decision making with basic machine learning
‫techniques such as linear regression did not do with good accuracy.
‫Before we move on, let's take a minute to discuss this network's nomenclature.
‫This is a neural network.
‫Now, each set of parallel neurons are called layers.
‫The first is the input layer.
‫The last is the output layer.
‫And these in-between are the hidden layers
‫This network had five inputs.
‫Three cells in hidden layer 1, four in hidden layer 2 and one in the output layer.
‫So for brevity, this network can also be called as a five, three, four, one network
‫Also notice that the process information in this network is flowing in only the forward direction.
‫Which is why such a network
‫Is also called a feed forward
‫Network.
‫In comparison, if the output of one of the cells of that layer goes back as input to another cell of
‫that layer only, then it is called a cyclic network.
‫Recurrent neural networks
‫Also known as rnn, are example of cyclic Network.
‫Rnn are used in natural language processing and language modeling.
‫For now, let's come back to a standard feel forward
‫Network
‫Now, you can notice here that output from this cell
‫It's going to four cells
‫These are not four different outputs.
‫It is only one output.
‫The same output is going as input and all these four cells
‫Also note that every neuron in each layer, is connected to every other neuron in the adjacent forward
‫Layer.
‫Therefore, this network is fully connected.
‫If somehow some links were missing, we call it partially connected.
‫But for most practical purposes, we use a fully connected network.
‫Before I close this lecture, I would like to tell you that within this short span of time in which
‫we covered this lecture, we have entered the world of deep learning.
‫Such artificial neural networks is what deep learning is made up of.
‫Basically, think of this like a system which learns the relationship between input and output.
‫The more layers we have in the system, the more deep our system is and more it is capable of establishing
‫complex relationship between input and output.
‫So I hope that you understand the basics of neural networks.
‫In the next lecture will go deeper and see how these networks process the output and find the optimum
‫values of weights and biases to get good accuracy of prediction.
‫See you in the next lecture.