KEMBAR78
[Lecture 4] AI and Deep Learning: Neural Network (Theory) | PPTX
Introduction to
Artificial Intelligence & Deep Learning
Lecture 4: Shallow Neural Network
Dr. Kobkrit Viriyayudhakorn
What is a Neural Network?
𝑧 = 𝑤 𝑇
𝑥 + 𝑏𝑤
𝑏
𝑎 = 𝜎 𝑧 ℒ 𝑎, 𝑦
𝑥
Logistic Regression
Neural Network
𝑥
𝑧 1
= 𝑤 1
𝑥 + 𝑏 1𝑤 1
𝑏 1
𝑎 1 = 𝜎 𝑧 1
ℒ 𝑎 2 , 𝑦𝑧 2
= 𝑤 2
𝑎 1
+ 𝑏 2
𝑤 2
𝑏 2
𝑎 2 = 𝜎 𝑧 2
Neural Network Representation
Neural Network Representation
𝑤 𝑇 𝑥 + 𝑏 𝜎 𝑧
𝑥1
𝑥2
𝑥3
𝑎 = 𝑦
Neural Network Representation
Neural Network Representation Learning
Vectorizing Across Multiple Training Examples
Vectorizing Across Multiple Training Examples
Explanation for Vectorized Implementation
Explanation for Vectorized Implementation
Activation Function: Sigmoid
Activation Function : Tanh
Activation Function : ReLu and Leaky ReLu
Pro and cons for Activation functions
• Sigmoid
Pro and cons for Activation functions
• Tanh
Pro and cons for Activation functions
• ReLu and Leaky ReLu
Why Neuron Network need the activation
function?
Why Neuron Network need the activation
function?
Derivative of Activation function
• Sigmoid
Derivative of Activation function
• Tanh
Derivative of Activation function
• ReLu and Leaky ReLu
Gradient Descent for Neural Network
Formulas For Computing Derivatives
Backpropagation Intuition
• Logistic Regression
𝑧 = 𝑤 𝑇 𝑥 + 𝑏𝑤
𝑏
𝑎 = 𝜎 𝑧 ℒ 𝑎, 𝑦
𝑥
Backpropagation Intuition
• Neural Network
𝑥
𝑧 1 = 𝑤 1 𝑥 + 𝑏 1𝑤 1
𝑏 1
𝑎 1 = 𝜎 𝑧 1
ℒ 𝑎 2 , 𝑦𝑧 2 = 𝑤 2 𝑎 1 + 𝑏 2
𝑤 2
𝑏 2
𝑎 2 = 𝜎 𝑧 2
Summary of Gradient Descent
ⅆ𝑧 2
= 𝑎 2
− 𝑦
ⅆ𝑤 2 = 𝑑𝑧 2 𝑎 1 𝑇
ⅆ𝑏 2 = ⅆ𝑧 2
ⅆ𝑧 1 = 𝑤 2 𝑇 ⅆ𝑧 2 ∗ g 1 ′
𝑧 1
ⅆ𝑤 1
= 𝑑𝑧 1
𝑥 𝑇
ⅆ𝑏 1
= ⅆ𝑧 1
Random Initialization
• Why?
Random Initialization
• Code

[Lecture 4] AI and Deep Learning: Neural Network (Theory)