output = activation(weight * input + bias) -> Option D
Quick Check:
Neuron output = weighted sum + bias, then activation [OK]
Hint: Neuron output = activation(weight x input + bias) [OK]
Common Mistakes:
Mixing order of operations
Forgetting to apply activation function
Using addition instead of multiplication for weights
3. Given a single neuron with weight = 0.5, bias = 1, input = 4, and activation function f(x) = x (identity), what is the output after forward propagation?
Hint: Always apply activation after weighted sum [OK]
Common Mistakes:
Thinking bias should be multiplied
Confusing operators
Ignoring activation importance
5. You have a 2-layer neural network where the first layer outputs [2, 3] and the second layer has weights [[1, -1], [0, 2]] and biases [0, 1]. Using ReLU activation f(x) = max(0, x), what is the output of the second layer after forward propagation?
hard
A. [3, 4]
B. [2, 5]
C. [0, 7]
D. [1, 6]
Solution
Step 1: Calculate weighted sums for second layer
Multiply first layer output by weights and add biases:
For first neuron: (2*1) + (3*0) + 0 = 2 + 0 + 0 = 2
For second neuron: (2*(-1)) + (3*2) + 1 = -2 + 6 + 1 = 5
Step 2: Apply ReLU activation
ReLU outputs max(0, x):
First neuron: max(0, 2) = 2
Second neuron: max(0, 5) = 5