Professional Documents
Culture Documents
Artificial Neural Network
Artificial Neural Network
Objectives
• To understand :
▫ the similarities between biological neuron and
artificial neuron;
▫ how artificial neural network learns;
▫ the difference between machine learning and
deep learning;
▫ The applications of machine learning and deep
learning.
Human Intelligence vs
Artificial Intelligence
Human Intelligence
Artificial Intelligence
AI, ML and DL
ANN Applications
Biological neurons
Biological neural network
Synapse
Synapse Dendrites
Axon
Axon
Soma Soma
Dendrites
Synapse
Artificial Neural Network (ANN)
The neuron as a simple computing
element
The neuron uses a transfer function to
produce an output
Logical AND operator with ANN…
• Epoch 1, Input 1 :
• X=(x1*w1)+(x2*w2)
• =(0*0.3)+(0*-0.1)
• =0
Threshold value for step function, ϴ=0.2) to
compute actual output (Y)
Y = 0 because X < 0.2
E=Yd – Y
= 0-0=0
…Logical AND operator with ANN…
• Epoch 1, Input 2:
• X=(x1*w1)+(x2*w2)
• =(0*0.3)+(1*-0.1)
• =0-0.1=-0.1
Threshold value for step function, ϴ=0.2) to
compute actual output (Y)
Y = 0 because X < 0.2
E=Yd – y
= 0-0=0
…Logical AND operator with ANN…
• Epoch 1, Input 3 :
• X=(x1*w1)+(x2*w2)
• =(1*0.3)+(0*-0.1)
• =0.3-0=0.3
W1
W2
-2.5
f(x)
W3
1.4
-0.06
2.7
-8.6
-2.5
f(x)
0.002
x = -0.06×2.7 + 2.5×8.6 + 1.4×0.002 = 21.34
1.4
Training the neural network
Fields class
1.4 2.7 1.9 0 Initialise with random weights
3.8 3.4 3.2 0
6.4 2.8 1.7 1
4.1 0.1 0.2 0
etc …
Training data
Fields class Present a training pattern
1.4 2.7 1.9 0
3.8 3.4 3.2 0
6.4 2.8 1.7 1
4.1 0.1 0.2 0
etc …
1.4
2.7
1.9
Training data
Fields class Feed it through to get output by multiplying
1.4 2.7 1.9 0 with random weight
3.8 3.4 3.2 0
6.4 2.8 1.7 1
4.1 0.1 0.2 0
etc …
1.4
2.7
1.9
Training data
Fields class Compare with target output
1.4 2.7 1.9 0
3.8 3.4 3.2 0
6.4 2.8 1.7 1
4.1 0.1 0.2 0
etc …
1.4
2.7
1
1.9
Training data
Fields class Adjust weights based on error
1.4 2.7 1.9 0
3.8 3.4 3.2 0
6.4 2.8 1.7 1
4.1 0.1 0.2 0
etc …
1.4
2.7
1
1.9
Training data
Fields class And so on ….
1.4 2.7 1.9 0
3.8 3.4 3.2 0
6.4 2.8 1.7 1
4.1 0.1 0.2 0
etc …
6.4
2.8 0.9
1
1.7
Color ANN
Texture SVM
shape KNN
DEMO
43
Pre-trained models
WHY IS DEEP LEARNING POPULAR?
Architecture
•How many of each type of layer
•In what order
Training Convolutional Neural
Network using Matlab
SAMPLE APPLICATION:
DIGIT RECOGNITION
TRAIN CNN FROM SCRATCH
DATA PREPARATION
SAMPLE DIGITS IN DIGITDATASET
DIGIT RECOGNITION PERFORMANCE
(PARAMETER TUNING)
5,20 3
15, 0.0001 0.9144 36.708
3,20 3
9,40 3 15, 0.0001 0.9192, 50.612
https://www.youtube.com/watch?v=vvimBPJ3XGQ
Review questions
1. What is ANN?
2. What is the difference between machine
learning and deep learning?
3. How does an ANN learn?
4. What type of application is suitable to be
developed using ANN ?