Sample questions
Question 1Easy
What is the output of ReLU for the input -3?
- 0
- -3
- 3
- 0.05
Answer: A. 0
Explanation
ReLU(x) = max(0, x), so negative inputs become 0.
Step-by-step solution
- ReLU(x) = max(0, x).
- max(0, -3) = 0.
- Negative inputs become 0; positive inputs pass unchanged.
Why the other options are wrong
- B. ReLU blocks negative values instead of passing them through.
- C. ReLU does not take the absolute value.
- D. A small negative slope is Leaky ReLU, and it would give a negative value, not 0.05.
Question 2Easy
Why are non-linear activation functions (like ReLU) used in neural networks?
- Without them, stacked layers collapse into one linear map
- They remove the need for weights
- They make the training data larger by creating new transformed copies of each example
- They guarantee zero training error
Answer: A. Without them, stacked layers collapse into one linear map
Explanation
A composition of linear functions is linear; non-linearities let deep networks represent complex functions.
Step-by-step solution
- A linear layer computes Wx + b.
- Stacking linear layers gives W2(W1x + b1) + b2, which is still one linear map.
- Non-linear activations break this, letting deep networks model curved relationships.
Why the other options are wrong
- B. Activations are applied after weighted sums; weights are still needed.
- C. Activations transform values inside the network; they do not create new examples.
- D. No activation guarantees zero training error.
Tip: No activation = one big linear model.
Question 3Medium
Convolutional Neural Networks (CNNs) are especially suited to images because they:
- Treat each pixel as an independent feature
- Need no training data because their filters are fixed edge detectors
- Share weights across positions and exploit local patterns
- Process data strictly as a time sequence
Answer: C. Share weights across positions and exploit local patterns
Explanation
A kernel slides over the image, detecting the same feature anywhere with far fewer parameters than a fully connected layer.
Step-by-step solution
- Nearby pixels are strongly related; a convolution looks at small local patches.
- The same filter slides over the whole image (weight sharing).
- This needs far fewer parameters and detects a pattern wherever it appears.
Why the other options are wrong
- A. Treating pixels independently ignores spatial structure; that is what dense layers do.
- B. CNN filters are learned from data.
- D. Sequential processing describes RNNs.
Question 4Medium
The vanishing gradient problem is most associated with:
- Deep networks using sigmoid or tanh activations
- Networks with very few layers
- Using ReLU activations in every hidden layer of the network
- Using a very small training set
Answer: A. Deep networks using sigmoid or tanh activations
Explanation
Sigmoid and tanh derivatives are below 1 (sigmoid's at most 0.25), so multiplying many of them shrinks gradients. ReLU, residual connections and normalisation help.
Step-by-step solution
- Sigmoid and tanh saturate: their derivatives are small for large inputs (sigmoid at most 0.25).
- Backprop multiplies these derivatives across layers.
- In deep networks, the product shrinks towards zero, so early layers barely learn.
Why the other options are wrong
- B. Shallow networks have few multiplications, so vanishing is mild.
- C. ReLU is one of the fixes for vanishing gradients.
- D. Training set size is not the cause.
Tip: Vanishing gradients: deep + sigmoid/tanh.
Question 5Medium
- A method for initialising weights randomly
- A technique for pruning unused neurons
- A way to feed outputs back as inputs, as in recurrent networks
- Computing loss gradients for all weights via the chain rule
Answer: D. Computing loss gradients for all weights via the chain rule
Explanation
Gradients flow backwards from the loss layer by layer; an optimiser such as SGD or Adam then uses them to update weights.
Step-by-step solution
- A forward pass computes the loss.
- Backpropagation applies the chain rule layer by layer from output to input.
- This gives the gradient of the loss for every weight, which gradient descent then uses.
Why the other options are wrong
- A. Weight initialisation happens before training.
- B. Pruning removes weights; backpropagation computes gradients.
- C. Feeding outputs back as inputs describes recurrence, not backpropagation.
Question 6Medium
A fully connected network has 4 inputs, one hidden layer of 8 neurons and 3 outputs, with biases. How many trainable parameters does it have?
- 35
- 96
- 67
- 56
Answer: C. 67
Explanation
Input to hidden: 4 x 8 weights + 8 biases = 40.
Hidden to output: 8 x 3 weights + 3 biases = 27.
Total = 67.
Step-by-step solution
- Input to hidden: 4 x 8 weights + 8 biases = 40.
- Hidden to output: 8 x 3 weights + 3 biases = 27.
- Total = 40 + 27 = 67.
Why the other options are wrong
- A. 35 adds nodes or misses the weight products.
- B. 96 is 4 x 8 x 3, which is not how layers connect.
- D. 56 counts weights only (32 + 24) and forgets the 11 biases.
Tip: Dense params = (inputs + 1) x outputs: 5 x 8 + 9 x 3 = 67.
Question 7Medium
A 32 x 32 image passes through a convolution layer with a 5 x 5 kernel, stride 1 and no padding. What is the spatial size of the output?
- 30 x 30
- 28 x 28
- 32 x 32
- 27 x 27
Answer: B. 28 x 28
Explanation
Output = (W - K + 2P) / S + 1 =
(32 - 5 + 0) / 1 + 1 = 28.
Step-by-step solution
- Output = (N - K + 2P) / S + 1.
- = (32 - 5 + 0) / 1 + 1.
- = 28, so 28 x 28.
Why the other options are wrong
- A. 30 x 30 would be a 3 x 3 kernel.
- C. 32 x 32 needs padding 2.
- D. 27 x 27 forgets the + 1.
Tip: No padding, stride 1: output = N - K + 1.
Question 8Hard
Which activation and loss combination is standard for multi-class classification with mutually exclusive classes?
- Softmax output with categorical cross-entropy loss
- ReLU output with hinge loss summed over all the class outputs
- Linear output with mean absolute error
- Sigmoid output with mean squared error
Answer: A. Softmax output with categorical cross-entropy loss
Explanation
Softmax turns logits into a probability distribution summing to 1; cross-entropy penalises low probability on the true class.
Step-by-step solution
- Mutually exclusive classes need probabilities that sum to 1.
- Softmax turns raw scores into such a distribution.
- Categorical cross-entropy then penalises low probability on the true class.
Why the other options are wrong
- B. ReLU outputs are not probabilities; hinge loss is for SVM-style margins.
- C. Linear output with MAE is a regression setup.
- D. Sigmoid with MSE is for independent outputs and trains poorly for classification.
Question 9Hard
In mini-batch gradient descent, what is one epoch?
- One update of the weights after processing a single training example
- Processing a single mini-batch
- The time until validation loss stops falling
- One full pass through the entire training dataset
Answer: D. One full pass through the entire training dataset
Explanation
With 10,000 examples and a batch size of 100, one epoch consists of 100 iterations (weight updates).
Step-by-step solution
- Each mini-batch gives one weight update.
- An epoch ends when every training example has been used once.
- With n examples and batch size b, one epoch has n / b updates.
Why the other options are wrong
- A. A single-example update is one step of stochastic gradient descent.
- B. A single mini-batch is one iteration, not an epoch.
- C. That describes early stopping, not an epoch.
Tip: Updates per epoch = dataset size / batch size.
Question 10Hard
A 64 x 64 input goes through a convolution with a 3 x 3 kernel, padding 1 and stride 2. What is the output size?
- 62 x 62
- 64 x 64
- 31 x 31
- 32 x 32
Answer: D. 32 x 32
Explanation
Output = floor((64 - 3 + 2 x 1) / 2) + 1 = floor(63 / 2) + 1 =
31 + 1 = 32.
Step-by-step solution
- Output = floor((N - K + 2P) / S) + 1.
- = floor((64 - 3 + 2) / 2) + 1 = floor(31.5) + 1.
- = 31 + 1 = 32, so 32 x 32.
Why the other options are wrong
- A. 62 x 62 ignores padding and stride.
- B. 64 x 64 ignores the stride of 2.
- C. 31 x 31 forgets the + 1.
Tip: 'Same' padding + stride 2 -> size halves (rounded up).
Practise all 10 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →