AML 03 Dense Neural Networks
AML 03 Dense Neural Networks
AML 03 Dense Neural Networks
x1 w1
w2
x2 Σ g
x3 w3
b
1
Activation function is the secret sauce
of neural networks
• Neural network training is
all about tuning weights
x1 and biases
w1
1
• Sigmoid: 𝑔 𝑥 =
1+𝑒 −𝑥
• Tanh: 𝑔 𝑥 = tanh(𝑥)
• ReLU: 𝑔 𝑥 = max(0, 𝑥)
𝑒 𝑥𝑖
• Softmax: 𝑔 𝑥𝑖 = 𝑥𝑖
𝑖𝑒
• Linear: 𝑔 𝑥 = 𝑥
Step function divides the input space
into two halves 0 and 1
• In a single neuron, step
function is a linear binary
classifier
• The weights and biases
determine where the step will
be in n-dimensions
• But, as we shall see later, it
gives little information about
how to change the weights if
we make a mistake
• So, we need a smoother
version of a step function
• Enter: the Sigmoid function
The sigmoid function is a smoother
step function
x
* ?
ReL
W1 + Z1 A1
U
b1 * ?
SoftM
W2 + Z2 A2
ax
b2 CE Loss
targ
et