0% found this document useful (0 votes)
25 views5 pages

Neural Network Parameter Calculation Guide

Uploaded by

Shubham Chaubey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

Neural Network Parameter Calculation Guide

Uploaded by

Shubham Chaubey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ANN Session−2

Example−2:
3 NN :
Input layer :3 neurons
Hidden layer :2 neurons
Output layer :1neurons

Input layer outputs are=Inputs only


Hidden layer inputs are x 1 , x 2 , x 3 also w 11 , w12 , w 21 , w 22 , w31 , w32

o 1=Activation(bh 1 +w 11∗x 1 +w 21∗x 2+ w31∗x 3)

o 2= Activation(bh 2 +w 12∗x1 + w22∗x 2 +w 32∗x3 )


How many weights at hiddenlayer : 6
number of neurons∈input layer∗number of neurons ∈hiddenlayer
How many parameters at hiddenlayer=weights+bias=6+2=8
number of neurons∈input layer∗number of neurons ∈hiddenlayer+ number of neurons ∈hiddenlayer
¿

o 1=Activation(bh 1 +w 11∗x 1 +w 21∗x 2+ w31∗x 3)

o 2= Activation(bh 1 +w 12∗x1 + w22∗x 2 +w32∗x 3 )

Output layer
y= Activation(b 0 +w h11∗o 1+ wh 12∗o2)
How many weights at hiddenlayer : 2
number of neurons∈hiddenlayer∗number of neurons∈ output layer=2∗1=2
How many parameters at hiddenlayer=weights+bias=2+1=3
number of neurons∈hiddenlayer layer∗number of neurons∈output layer+ number of neurons∈output layer

Total parameters∈above network=8+3=11

Maths Calculations

at Input layer :
 No bias−No weights :Total parameters=0

At Hidden Layer :
Hidden layer−1 :Neuron ( 1 ) :b h 1+ w11∗x 1+ w21∗x 2 +w 31∗x 3

Hidden layer−1 :Neuron ( 2 ) : bh 2+ w12∗x 1 +w 22∗x 2+ w32∗x 3 ¿

Bias ( 2 ) :bh 1 , bh 2 ,Weihgts ( 6 ) : w11 , w 21 , w12 , w22 , w31 , w32

Total parameters=2+6=8
Trick : Hiddenlayer parameters
inputlaye r neurons∗Hiddenlaye r Neurons + Hiddenlaye r Neurons

inputlaye r neurons∗Hiddenlaye r Neurons : Number of weights

Hiddenlaye r Neurons : Number of Bias

At Output layer :
o 1=Activation ( wh 1+ w11∗x 1 +w 21∗x2 )

o 2= Activation ( wh 2 +w 12∗x1 + w22∗x 2 )

y= Activation(wo + wh 1 o∗o1+ w h2 o∗o 2)


Trick :output layer parameters
Hiddenlaye r Neurons∗outpu t layer +outpu t layer

2∗1+ 1=3

4 NN
Input layer=3 neurons
Hidden layer−1 :3 neurons
Hidden layer−2 :2 neurons
output layer :1 neuron

layer (nuerons) Parameter (weights+bias)


Input layer (3) 0
Hidden layer (3) 3∗3+3=12
Hidden layer (2) 3∗2+2=8
output layer (1) 2∗1+ 1=3
23

5NN
Input layer=10 neurons
Hidden layer−1 :10 neurons
Hidden layer−2 :5 neurons
Hidden layer−2 :3 neurons
output layer :10 neuron

Total :183 185 216 , 222 , 223 ,282 , 183


layer (nuerons) Parameter (weights+bias)
Input layer (10) 0
Hidden layer (10) 10∗10+10=110
Hidden layer (5) 10∗5+5=55
Hidden layer (3) 5∗3+3=18
output layer (10) 3∗10+10=40
223

6 NN
Input layer=20 neurons
Hidden layer−1 :15 neurons
Hidden layer−2 :8 neurons
Hidden layer−3 :5 neurons
Hidden layer−4 :3 neuron
output layer :10 neuron
Type equation here .
layer (nuerons) Parameter (weights+bias)
Input layer (20) 0
Hidden layer (15) 20∗15+15=315
Hidden layer (8) 15∗8+8=128
Hidden layer (5) 8∗5+5=45
Hidden layer (3) 5∗3+3=18
output layer (10) 3∗10+10=40
546

1)
2)
How ¿ find the parameters

3)
what is the activation function

4)
How ¿ choose the hiddenlayers

5)
How ¿ avoid the overfitting
How ¿ speed up the process

You might also like