Neural Networks · Machine Learning
4 questions · asked in 3 of 3 years (2024–2026)
MCQ 2 · MSQ 1 · NAT 12-mark 4
2024Questions per year2026
Questions 1–4 of 4
Consider a fully-connected feed-forward multi-layer perceptron. It has neurons in the input layer, followed by two hidden layers and an output layer. The first hidden layer has neurons and the second hidden layer has neurons. The output layer has only one neuron. Assume that no bias parameters are used.
The number of learnable parameters in the multi-layer perceptron is ________. (Answer in integer)
The number of learnable parameters in the multi-layer perceptron is ________. (Answer in integer)
Answer: 135
There are no bias parameters. So the parameters in each layer are the neurons in the previous layer the neurons in the current layer:
Input () Hidden 1 ():
Hidden 1 () Hidden 2 ():
Hidden 2 () Output ():
Sum of all:
Answer: 135
Input () Hidden 1 ():
Hidden 1 () Hidden 2 ():
Hidden 2 () Output ():
Sum of all:
Answer: 135
Consider the neural network shown in the figure with
inputs:
weights:
output:
denotes the ReLU function, .
Given ,
,
which one of the following is correct?
inputs:
weights:
output:
denotes the ReLU function, .
Given ,
,
which one of the following is correct?
Answer: (A)
From the figure: the top ReLU receives through and through . The bottom ReLU receives through and through . The output ReLU receives the top output through and the bottom output through .
Forward pass with :
Top input , so top output and the ReLU slope is .
Bottom input , so bottom output and the ReLU slope is .
Output input , so and the slope is .
: the chain is output ReLU, then , then top ReLU, then :
: multiplies the bottom output, which is :
Answer: (A)
Forward pass with :
Top input , so top output and the ReLU slope is .
Bottom input , so bottom output and the ReLU slope is .
Output input , so and the slope is .
: the chain is output ReLU, then , then top ReLU, then :
: multiplies the bottom output, which is :
Answer: (A)
Which of the following statements is/are correct about the rectified linear unit (ReLU) activation function defined as ReLU() = max(, 0), where ?
One or more options are correct.
Answer: (A), (C)
- Continuous everywhere: true — the two linear pieces ( for , and for ) join exactly at . Both give , so the graph has no jump anywhere.
- Differentiable everywhere: false — the slope changes suddenly from on the left to on the right at . This is a sharp corner.
- Not differentiable at : true, for the same reason as above.
- for all : false — for example, gives but , so they are not equal.
Answer: ReLU is continuous everywhere; and ReLU is not differentiable at x=0.
Consider the two neural networks (NNs) shown in Figures 1 and 2, with activation ). denotes the set of real numbers. The connections and their corresponding weights are shown in the Figures. The biases at every neuron are set to 0 . For what values of in Figure 2 are the two NNs equivalent, when are positive?
Answer: (A)
For positive inputs and positive weights with zero bias, every neuron's input is positive, so . The ReLUs do nothing and each neuron just outputs the weighted sum of its inputs.
First hidden layer (all weights 1):
, , .
Second hidden layer (all weights 2, each neuron takes all of ):
.
Output (weights 3):
.
Figure 2 gives . Matching coefficients, . Option (B) has and , so and are weighted wrongly. Option (D) gives every input weight 36, but and each pass through only 2 of the 3 first-layer neurons.
Answer: (A)
First hidden layer (all weights 1):
, , .
Second hidden layer (all weights 2, each neuron takes all of ):
.
Output (weights 3):
.
Figure 2 gives . Matching coefficients, . Option (B) has and , so and are weighted wrongly. Option (D) gives every input weight 36, but and each pass through only 2 of the 3 first-layer neurons.
Answer: (A)
Keep practising