1
00:00:03,800 --> 00:00:09,080
In this session, we want to see how to calculate maximum number of neurons per layer.

2
00:00:09,830 --> 00:00:11,800
Let's take a look at this example.

3
00:00:11,810 --> 00:00:18,140
If you have this equation to explore, tree y equals 12, can you solve it?

4
00:00:18,860 --> 00:00:27,200
The answer is no, because we need more information by another hand of our indeterminate are more than

5
00:00:27,380 --> 00:00:28,290
determinate.

6
00:00:28,580 --> 00:00:37,670
But if we just give it another one, let's say six X minus two Y equals seven, then we can solve it

7
00:00:37,670 --> 00:00:45,280
because the number of determination, an indeterminate in this example are the same based on this rule,

8
00:00:45,710 --> 00:00:52,520
we can say for solving an equation or any problem, the number of indeterminate must be less or equal.

9
00:00:52,520 --> 00:00:59,420
Dan Determinates, based on this fact, we are going to calculate the number of neurons per layer.

10
00:00:59,630 --> 00:01:06,120
So first, let's see how many determinants do we have when we want to design our network?

11
00:01:06,380 --> 00:01:18,380
Supposing your cell phone, you have some inputs, here are your inputs and one here is over X, so

12
00:01:18,380 --> 00:01:18,830
fine.

13
00:01:18,830 --> 00:01:24,320
We have a column of inputs and then here we have over outputs.

14
00:01:25,610 --> 00:01:31,940
And this is another column that can be actually several columns for this one.

15
00:01:31,940 --> 00:01:39,320
We call it an off o and then we have K elements or K samples of H.

16
00:01:39,720 --> 00:01:48,440
This part would be OK and here are several columns and several rows.

17
00:01:48,950 --> 00:01:58,150
If we want to calculate total number of determinants, we can say it's K times in parentheses and I

18
00:01:58,190 --> 00:02:00,190
plus an O.

19
00:02:00,800 --> 00:02:06,020
This is how we can calculate the total determinant in our problem.

20
00:02:07,040 --> 00:02:11,780
Let's take a look at this multi-layer neural network supples here.

21
00:02:11,780 --> 00:02:13,190
We have several layers.

22
00:02:13,190 --> 00:02:14,150
We have some inputs.

23
00:02:14,150 --> 00:02:18,680
First, these are inputs which we call them.

24
00:02:18,680 --> 00:02:22,330
And if I let's say here we have two layers.

25
00:02:22,760 --> 00:02:27,290
This is the first layer and this is the second layer.

26
00:02:27,320 --> 00:02:36,650
And finally we have some outputs as well, which we show it with enough for the first layer we have

27
00:02:37,220 --> 00:02:43,880
in one neurons and for the second layer we have in two nephrons.

28
00:02:44,570 --> 00:02:50,180
Now we want to see how many indeterminate do we have for the first layer.

29
00:02:50,680 --> 00:02:51,980
Take a look at this, Neren.

30
00:02:52,550 --> 00:02:59,430
In engineering, we can have a number of inputs plus our bias because we have a bias as well.

31
00:02:59,690 --> 00:03:06,980
So in other hand, we can say a number of indeterminism for the first layer are in one times in apprentice's,

32
00:03:06,980 --> 00:03:12,260
in a number of inputs plus one, which is of our bias.

33
00:03:12,440 --> 00:03:19,100
If we have two neurons, then it would be two off and I plus one.

34
00:03:19,740 --> 00:03:22,120
But what about the second layer?

35
00:03:23,270 --> 00:03:30,080
The number of inputs for the second layer are equal to the number of neurons that we have here.

36
00:03:30,080 --> 00:03:31,890
Each neuron is giving one output.

37
00:03:32,060 --> 00:03:34,470
This one is N one plus one.

38
00:03:34,520 --> 00:03:37,870
Of course we have our bias as well.

39
00:03:38,270 --> 00:03:41,540
And then how many neurons do we have in the second layer?

40
00:03:41,540 --> 00:03:42,770
We have in two neurons.

41
00:03:42,790 --> 00:03:52,610
So number of indeterminate for a second layer are into in apprentice's and one plus one because no one

42
00:03:52,610 --> 00:03:56,240
needs our input for the second layer.

43
00:03:56,360 --> 00:04:05,720
And we already know that number of neurons in a second layer must be equal to the number of other outputs

44
00:04:05,870 --> 00:04:09,080
so that her to say and two is equal to.

45
00:04:09,080 --> 00:04:13,100
And actually this is a mass for multilayer Perceptron.

46
00:04:14,060 --> 00:04:19,790
If we have more outputs, if you have more neurons, each neuron is giving an output.

47
00:04:20,180 --> 00:04:25,880
If, for example, we have two outputs, then what would be the use of tarried narrowed in the second

48
00:04:25,880 --> 00:04:26,240
layer?

49
00:04:26,270 --> 00:04:36,860
We must have two neurons for the second layer as well, so I can already rewrite it as an old enough

50
00:04:36,860 --> 00:04:42,620
output number of neurons in output in apprentices and one plus one.

51
00:04:43,460 --> 00:04:49,040
OK, we can calculate the total off indeterminate for other network.

52
00:04:49,610 --> 00:04:55,490
This will from indeterminacy for our network would be the number of determinates for the first layer

53
00:04:55,490 --> 00:05:00,140
plus the number of indeterminism for the second layer.

54
00:05:02,460 --> 00:05:03,840
And here we have it.

55
00:05:07,060 --> 00:05:08,360
Now, let's check it here.

56
00:05:08,380 --> 00:05:13,630
We know that in determinates must be a less or equal than determinates.

57
00:05:14,200 --> 00:05:21,700
These are other indeterminism which were calculated here and these are the total number of samples and

58
00:05:21,850 --> 00:05:30,400
determinates that we can have in and was actually in reality, we're not usually using all the samples.

59
00:05:30,550 --> 00:05:32,700
Not all the samples are useful.

60
00:05:32,860 --> 00:05:37,320
But however, this can be the maximum of elements that we can have.

61
00:05:38,560 --> 00:05:45,130
I'm looking for a number of concerns for the first layers, so I'm going to keep this and one at one

62
00:05:45,130 --> 00:05:48,140
side and send the rest of them in the other side.

63
00:05:49,390 --> 00:05:54,600
This is what we can have and this is already the upper limit.

64
00:05:55,060 --> 00:05:58,040
How about the lower limit for the lower limit?

65
00:05:58,360 --> 00:06:07,420
We really can say it's just based on experience, but we can just write it as two times off number of

66
00:06:07,420 --> 00:06:10,120
inputs plus a number of outputs.

67
00:06:10,450 --> 00:06:17,870
We can just put this one for the lower limit and set Dysport for upper upper limit.

68
00:06:18,610 --> 00:06:25,270
So here is how we can calculate the number of neurons for each layer.

69
00:06:27,100 --> 00:06:31,090
Now let's back to Matlab and have more examples.
