In this session, we want to see how to calculate maximum number of neurons per layer.
Let's take a look at this example.
If you have this equation to explore, tree y equals 12, can you solve it?
The answer is no, because we need more information by another hand of our indeterminate are more than
determinate.
But if we just give it another one, let's say six X minus two Y equals seven, then we can solve it
because the number of determination, an indeterminate in this example are the same based on this rule,
we can say for solving an equation or any problem, the number of indeterminate must be less or equal.
Dan Determinates, based on this fact, we are going to calculate the number of neurons per layer.
So first, let's see how many determinants do we have when we want to design our network?
Supposing your cell phone, you have some inputs, here are your inputs and one here is over X, so
fine.
We have a column of inputs and then here we have over outputs.
And this is another column that can be actually several columns for this one.
We call it an off o and then we have K elements or K samples of H.
This part would be OK and here are several columns and several rows.
If we want to calculate total number of determinants, we can say it's K times in parentheses and I
plus an O.
This is how we can calculate the total determinant in our problem.
Let's take a look at this multi-layer neural network supples here.
We have several layers.
We have some inputs.
First, these are inputs which we call them.
And if I let's say here we have two layers.
This is the first layer and this is the second layer.
And finally we have some outputs as well, which we show it with enough for the first layer we have
in one neurons and for the second layer we have in two nephrons.
Now we want to see how many indeterminate do we have for the first layer.
Take a look at this, Neren.
In engineering, we can have a number of inputs plus our bias because we have a bias as well.
So in other hand, we can say a number of indeterminism for the first layer are in one times in apprentice's,
in a number of inputs plus one, which is of our bias.
If we have two neurons, then it would be two off and I plus one.
But what about the second layer?
The number of inputs for the second layer are equal to the number of neurons that we have here.
Each neuron is giving one output.
This one is N one plus one.
Of course we have our bias as well.
And then how many neurons do we have in the second layer?
We have in two neurons.
So number of indeterminate for a second layer are into in apprentice's and one plus one because no one
needs our input for the second layer.
And we already know that number of neurons in a second layer must be equal to the number of other outputs
so that her to say and two is equal to.
And actually this is a mass for multilayer Perceptron.
If we have more outputs, if you have more neurons, each neuron is giving an output.
If, for example, we have two outputs, then what would be the use of tarried narrowed in the second
layer?
We must have two neurons for the second layer as well, so I can already rewrite it as an old enough
output number of neurons in output in apprentices and one plus one.
OK, we can calculate the total off indeterminate for other network.
This will from indeterminacy for our network would be the number of determinates for the first layer
plus the number of indeterminism for the second layer.
And here we have it.
Now, let's check it here.
We know that in determinates must be a less or equal than determinates.
These are other indeterminism which were calculated here and these are the total number of samples and
determinates that we can have in and was actually in reality, we're not usually using all the samples.
Not all the samples are useful.
But however, this can be the maximum of elements that we can have.
I'm looking for a number of concerns for the first layers, so I'm going to keep this and one at one
side and send the rest of them in the other side.
This is what we can have and this is already the upper limit.
How about the lower limit for the lower limit?
We really can say it's just based on experience, but we can just write it as two times off number of
inputs plus a number of outputs.
We can just put this one for the lower limit and set Dysport for upper upper limit.
So here is how we can calculate the number of neurons for each layer.
Now let's back to Matlab and have more examples.