Deep Learning · TEE · section
MT1A Q2
Current MT1 and the two teacher backprop examples
Question
Question (3 marks). A sigmoid neuron has inputs [2,1,3], weights [0.4,−0.2,0.5] and bias 0.1. Compute its output.
Answer — step by step
Given
Inputs x₁ = 2,x₂ = 1,x₃ = 3.
Matching weights w₁ = 0.4,w₂ = −0.2,w₃ = 0.5.
Bias b = 0.1; activation = sigmoid.
To find
Calculate net input z and activated output a.
Formula — which one and why
Weighted sum and activation. Each input is multiplied by its connection weight. Add these contributions, add the bias once, then apply the stated activation.
xᵢ = input i; wᵢ = its weight; b = bias; z = sum before activation; a = output after activation; f = the specified activation function.
z=\sum_iw_ix_i+ba=f(z)Yaad rakhne ka cue: Input × weight, sabka sum, bias once, phir activation.
Sigmoid output. The question specifies sigmoid, so turn the complete weighted sum into an output between 0 and 1. Negate z, evaluate the exponential, add 1, then take the reciprocal.
z = sum before activation; a = sigmoid output; e ≈ 2.71828 is the exponential base.
a=\frac1{1+e^{-z}}Yaad rakhne ka cue: Minus-z ki e power, plus one, phir one divided by whole denominator.
Solution — step by step
Step 1: multiply input 1 by weight 1.
x_1w_1=2(0.4)=0.8Step 2: multiply input 2 by weight 2.
x_2w_2=1(-0.2)=-0.2The minus sign belongs to the weight, so the contribution stays negative.
Step 3: multiply input 3 by weight 3.
x_3w_3=3(0.5)=1.5Step 4: add the three contributions.
s=0.8+(-0.2)+1.5=0.6+1.5=2.1Step 5: add the bias once.
z=s+b=2.1+0.1=2.2This is the preactivation. It is not yet the requested sigmoid output.
Step 6: negate z for the exponential.
-z=-2.2e^{-z}=e^{-2.2}\approx0.110803158Step 7: calculate the complete denominator.
1+e^{-z}=1+0.110803158=1.110803158Step 8: divide one by that denominator.
a=\frac1{1+e^{-z}}=\frac1{1.110803158}\approx0.900249511Final answer: sigmoid output ≈ 0.900249511. It lies between 0 and 1. The raw sum was 2.2, whereas the activated output is approximately 0.90025.