We have 3 subquestions (Q83–Q85) based on the same neural network. Let's solve them in order, starting with the forward pass.
Given:
One input:
Two hidden neurons
One output neuron
Hidden and output activation: ReLU (for Q83 and Q84)
Initial weights:
The forward pass is:
Here,
Hidden layer:
Apply ReLU, where
Output layer:
Since both output weights are 1:
Finally:
So the network's output is:
Now let's use this for each question.
The loss function is:
We need to understand what happens in two cases.
Case 1:
ReLU converts a negative number into zero:
Substitute into the loss:
Therefore, option 1 is correct.
Case 2:
ReLU leaves a positive number unchanged:
Substitute:
Therefore, option 3 is correct.
Correct answers: Option 1 and Option 3
Why is option 2 wrong? Because the output is
We need to calculate:
This is a backpropagation question. We use the chain rule: multiply the derivatives along the path from the loss back to the weight.
The path is:
So:
Let's calculate each part.
1. Derivative of loss
Differentiating with respect to
2. Derivative of output ReLU
Its derivative is:
Here,
If the condition is true, its value is 1.
If false, its value is 0.
3. Derivative of output preactivation
Therefore:
4. Derivative of hidden ReLU
Therefore:
5. Derivative of hidden preactivation
Therefore:
Now multiply all five terms:
Correct answer: Option 2 (the second listed formula)
Remember: Each indicator function comes from a ReLU derivative. One belongs to the output layer and the other to the hidden layer.
This question changes the activation functions:
Hidden layer: ELU, with
Output layer: ReLU
Input:
True target:
Learning rate:
Initial weights remain:
We need to find the new value of
First hidden neuron:
Second hidden neuron:
ELU is defined as:
For the first neuron,
For the second neuron,
Therefore:
Substitute the values:
Output activation is ReLU:
We need:
Using the chain rule:
Calculate each term:
| Derivative | Value | Reason |
|---|---|---|
| ReLU derivative, since | ||
| Equals | ||
| ELU derivative at zero is | ||
| Equals |
Multiply:
Gradient descent formula:
Substitute:
Final answer: -0.4
| Question | Concept | Answer |
|---|---|---|
| Q83 | ReLU and piecewise loss | Options 1 and 3 |
| Q84 | Chain rule and ReLU derivatives | Option 2 |
| Q85 | ELU derivative and gradient descent |
Important distinction for your exam: ReLU's derivative at a positive input is 1. ELU's derivative at zero, with