Professional Documents
Culture Documents
in
Back Propagation Network : Soft Computing Course Lecture 15 20, notes, slides
back-propagation
hidden
output
and
layers,
by example, multi-layer
network,
error
in
Learning : learning
computation
calculation.
e.
Back-Propagation
in
input,
Back-propagation
ww
w.
cs
et
ub
www.csetube.in
www.csetube.in
6 hours)
Slides
03-11
function;
Simple
12-16
in
3. Back-Propagation Algorithm
17-32
e.
ub
et
4. References
ww
w.
cs
02
www.csetube.in
33
www.csetube.in
Back-Propagation Network
What is BPN ?
present
for
the
units
of
the
hidden
layer
in
the
are
determined
by
e.
ub
et
is
w.
Back-propagation
cs
method
03
ww
www.csetube.in
of
training
multi-layer
www.csetube.in
SC - NN - BPN Background
is
difficult
task
when
there
the
in
units fully connected to units in the hidden layer and hidden units
e.
ub
propagated
et
cs
ww
decision.
w.
www.csetube.in
www.csetube.in
SC - NN - BPN Background
[Continued from previous slide]
error
signal
back-propagated
for
each
from
the
such
target
outputs
to
output
the
pattern
inputs
in
is
then
order
to
in
e.
et
ub
ww
w.
cs
05
www.csetube.in
www.csetube.in
SC - NN - BPN Background
1.1 Learning :
AND function
X1
0
0
1
1
AND
X2
0
1
0
1
W1
Y
0
0
0
1
Input I1
A
C
W2
Input I2
Output O
w1 0 + w2 1 < ,
w11 + w2 0 <
w1 1 + w2 1 >
e.
w10 + w2 0 <
in
satisfied.
ub
et
if both weights are set to 1 and the threshold is set to 1.5, then
(1)(0) + (1)(1) < 1.5 assign 0
w.
cs
ww
is
"how
the network
can
www.csetube.in
www.csetube.in
SC - NN - BPN Background
Example 1
AND Problem
X1
0
0
1
1
AND
X2
0
1
0
1
W1
Y
0
0
0
1
Input I1
A
C
W2
Input I2
Output O
in
sum of its two inputs and comparing this value with a threshold .
e.
if the net input (net) is greater than the threshold, then the output
ub
is 1, else it is 0.
et
if net >
then O = 1,
otherwise O = 0.
cs
net = w1 I1 + w2 I2
w.
Example 2
ww
applying the
"class 1".
AND operator
if
they
are
both
inputs are 1.
07
www.csetube.in
www.csetube.in
SC - NN - BPN Background
perceptron
consists of a set of
input
the net
input
net =
i=1
wi Ii
and
a threshold .
If the net input is greater than the threshold , then the output unit is
turned on , otherwise it is turned off.
To address the learning question, Rosenblatt solved two problems.
in
e.
ub
the
et
w.
the difference
cs
ww
www.csetube.in
is explained
www.csetube.in
SC - NN - BPN Background
in
presented again).
e.
input
Ii
et
If
ub
unchanged.
decreased by 1.
Wi
is
ww
09
w.
cs
www.csetube.in
www.csetube.in
SC - NN BPN Background
op
tp
dp
e.
in
ww
w.
cs
et
ub
10
www.csetube.in
www.csetube.in
SC - NN - BPN Background
X1
AND
X2 Y
1
1
0
0
1
0
0
0
e.
X1
1
1
0
0
in
+ +
+ +
+ +
+ +
cs
et
+
+
ub
w.
XOR
X1 X2 Y
1
1
0
1
0
1
0
1
1
0
0
0
ww
A
C
X2
X1
11
www.csetube.in
www.csetube.in
SC - NN Back Propagation Network
V11
OI1
IH1
th
th
input neuron to j
hidden neuron to j
OH1
W11
V21
IH2
OH2
Vl1
II
Vij
OO1
IO2
OHm
OO2
Hidden Layer
m- nodes
IOn
Wij
ub
Input Layer
i - nodes
IO1
Wm1
IHm
OI
th
in
OI2
W21
e.
II2
th
OOn
Output Layer
n - nodes
et
cs
The table below indicates an 'nset' of input and out put data.
w.
I1
0.3
Ouput
ww
No
I2
....
O1
O2
....
On
0.4
....
0.8
0.1
0.56
....
0.82
2
:
nset
In this section, over a three layer network the computation in the input,
hidden
and
output
layers
are
explained
while
the
step-by-step
www.csetube.in
www.csetube.in
SC - NN Back Propagation Network
x1
th
Vij
th
input neuron
to
hidden layer.
- The input to the hidden neuron is the weighted sum of the outputs
in
of the input
e.
ub
et
13
cs
mx
{ O }I
x1
ww
mx1
w.
{ I }H = [ V ]
www.csetube.in
www.csetube.in
SC - NN Back Propagation Network
OHp =
where
Note :
(1+e
- (IHP HP)
OHp
IHp
HP
input
that is always held at -1 and the non-zero threshold becomes the connecting
weight value as shown in Fig. below.
II
OI3
OI
{ O }H =
V3p
Vp
OIO = -1
ww
IIO = -1
w.
HP
in
V1p
V2p
e.
OI2
ub
II3
OI1
1
(1+e
et
II2
cs
II1
- (IHP HP)
above equation.
where (q =1, 2, 3 . . , n)
nxm
mx1
14
www.csetube.in
www.csetube.in
SC - NN Back Propagation Network
where
Note :
(1+e
- (IOq Oq)
OOq
IOq
Oq
and
Here
again
the
threshold
may
e.
Note
in
tackled
by
considering
ub
extra Oth neuron in the hidden layer with output of -1 and the threshold
IH3
IHm
2
3
m
OH2
OH3
OHm
W1q
w2q
W3q
{ O }O =
Wmq
(1+e
- (IOq Oq)
OOq
Oq
IHO = -1
cs
OH1
w.
IH2
ww
IH1
et
OHO = -1
15
www.csetube.in
www.csetube.in
SC - NN Back Propagation Network
a table indicating
an
'nset'
training)
Consider any r
th
in the table- 'nset' of input and output data" for the purpose of
training, calculate output O .
The error norm in output for the r th
output neuron is
in
(Tor - Oor )
ub
E1 = (1/2)
e.
The Euclidean norm of error E1 for the first training pattern is given by
r=1
et
This error function is for one training pattern. If we use the same
nset
E j (V, W, I)
w.
r=1
ww
E (V, W) =
cs
that
objective
is
stated
is
an
optimization
problem
solving,
where
the
nset
, t
nset
and
'nset'
over the
[W]
mxn
16
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
3. Back-Propagation Algorithm
The benefits of hidden layer neurons have been explained. The hidden layer
allows ANN
to
mapping. The
hierarchical
develop
complex
representation
and
just
the
linearly
separable ones.
The step-by-step algorithm for the training of Back-propagation network
is presented in next few slides. The network is the same , illustrated before,
has a three layer. The input layer is with nodes, the hidden layer with m
nodes
and
the
output
layer
with n
nodes.
An
example
for training a
BPN with five training set have been shown for better understanding.
ww
w.
cs
et
ub
e.
in
17
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
and
ww
w.
cs
et
ub
e.
in
18
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Normalize the I/P and O/P with respect to their maximum values.
For each training pair, assume that in normalized form there are
inputs given by
{ I }I
and
x1
Assume
between
that
the number of
neurons
in
1 < m < 21
ww
w.
cs
et
ub
e.
in
19
www.csetube.in
the
hidden
layers
lie
www.csetube.in
SC - NN - BPN Algorithm
Step 3 :
Let
[ V ]
[W]
= [ random weights ]
[V]
= [ random weights ]
0
= [W]
= [0]
can
be
in
value as 0.
ww
w.
cs
et
ub
e.
20
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Step 4 :
For training data, we need to present one set of inputs and outputs.
Present the pattern as inputs to the input layer { I }I .
then by using linear activation function, the output of the input layer
may be evaluated as
{ O }I = { I }I
x1
x1
Step 5 :
mx
{ O }I
x1
the hidden
layer
units,
cs
et
ub
sigmoidal function as
ww
w.
{ O }H =
evaluate
e.
Let
in
Step 6 :
(1+e
- (IHi)
mx1
21
www.csetube.in
the
output
using
the
www.csetube.in
SC - NN - BPN Algorithm
Step 7 :
nxm
{ O }H
mx1
Step 8 :
Let
the
output
layer
units,
function as
1
(1+e
- (IOj)
e.
in
{ O }O =
et
ub
ww
w.
cs
22
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Step 9 :
EP =
th
training set as
(Tj - Ooj )2
n
Step 10 :
Find a term { d } as
{d}=
ww
w.
cs
et
ub
23
e.
nx1
in
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Step 11 :
Find [ Y ] matrix as
[ Y ] = { O }H d
mxn
mx1 1xn
Step 12 :
Find
[W]
mxn
t +1
[W]
mxn
[Y]
mxn
Step 13 :
Find
ub
in
(OHi) (1 OHi )
ei
e.
{ d* } =
[ X ] matrix
24
= { O }I
x1
d*
1xm
ww
1xm
as
cs
[X]
w.
Find
et
mx1 mx1
www.csetube.in
{ I }I
d*
x1
1xm
www.csetube.in
SC - NN - BPN Algorithm
Step 14 :
Find
[V]
1xm
t +1
[V]
1xm
[X]
1xm
Step 15 :
Find
[V]
[W]
t +1
t +1
[V ]
[W ]
+ [V]
t
t +1
+ [W]
t +1
Step 16 :
error rate =
nset
Step 17 :
in
e.
ub
End of Algorithm
assuming
et
w.
ww
25
cs
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Problem :
Consider a
S. No.
I1
Input
I2
Output
O
0.4
-0.7
0.1
0.3
-0.5
0.05
0.6
0.1
0.3
0.2
0.4
0.25
0.1
-0.2
0.12
In this problem,
in
e.
0.1
cs
0.4
et
ub
ww
-0.7
w.
0.4
Input
layer
0.2
-0.2
TO = 0.1
-0.5
0.2
Hidden
layer
Output
layer
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Step 1 :
0.4
{ I }I =
x1
{ O }I =
x1
-0.7
2x1
0.1
0.4
-0.2
0.2
[W]
{ I }H
2 x1
{ I }H = [ V] T { O }I as
-0.5
2x2
Step 3 : Find
0.1
-0.2
0.4
-0.4
0.2
-0.7
in
ww
w.
cs
et
ub
e.
27
www.csetube.in
0.02
www.csetube.in
SC - NN - BPN Algorithm
Step 4 :
(1+e
)
0.5448
{ O }H =
1
(1+e
- (0.02)
ww
w.
cs
et
ub
e.
in
28
www.csetube.in
0.505
www.csetube.in
SC - NN - BPN Algorithm
Step 5 :
{ I }O
= [ W]
{ O }H
= ( 0.2
- 0.5 )
= - 0.14354
0.505
Step 6 :
{ O }O =
(1+e
- (0.14354)
= 0.4642
Step 7 :
in
ww
w.
cs
et
ub
e.
29
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Step 8 :
Training o/p
0.5448
[ Y ] = { O }H (d ) =
( 0.09058) =
0.505
0.0457
Step 9 :
[W]
= [W]
[Y]
assume =0.6
0.02958
0.02742
in
ub
e.
Step 10 :
0.2
cs
et
-0.5
( 0.09058) =
0.018116
0.04529
ww
w.
www.csetube.in
www.csetube.in
SC - NN - BPN Algorithm
Step 11 :
{ d* } =
at step 4
0.01132
at step 8
Step 12 :
[ X ] = { O }I ( d* ) =
-0.7
( 0.00449
0.01132)
0.001796
0.004528
0.003143
0.007924
e.
in
[V]
et
[X]
ww
31
w.
cs
[V]
ub
Step 13 :
www.csetube.in
0.002716
0.001885
0.004754
www.csetube.in
SC - NN - BPN Algorithm
Step 14 :
[V]
0.1
0.4
-0.2
0.2
0.001077
0.002716
0.001885
0.004754
[W]
0.0989
0.04027
0.1981
0.19524
0.2
-0.5
0.17042
0.02958
0.02742
0.52742
in
Step 15 :
e.
ub
and next training set is taken and the error will then get adjusted.
et
Step 16 :
cs
Iterations are carried out till we get the error less than the tolerance.
the weights
inferencing
ww
Once
w.
Step 17 :
are adjusted
new objects .
32
www.csetube.in
the
network
is
ready
for
www.csetube.in
SC - NN - BPN References
4. References : Textbooks
1. "Neural
2. "Soft Computing and Intelligent Systems Design - Theory, Tools and Applications",
in
ww
w.
cs
et
ub
e.
33
www.csetube.in