19What does a loss function measure during training?
Loss functions
Easy
A.The difference between predictions and targets
B.The brightness of the display
C.The number of images in a folder
D.The physical size of the computer
Correct Answer: The difference between predictions and targets
Explanation:
A loss function measures prediction error and provides a value that training aims to reduce.
Incorrect! Try again.
20What is the purpose of gradient descent in neural network training?
Optimization methods
Easy
A.To increase image resolution
B.To convert RGB into grayscale
C.To add labels to the dataset
D.To update parameters and reduce loss
Correct Answer: To update parameters and reduce loss
Explanation:
Gradient descent updates model parameters in a direction that aims to decrease the loss.
Incorrect! Try again.
21A warehouse robot must identify damaged packages and determine their locations on a conveyor belt. Which computer vision task is most directly suited to this requirement?
Role of computer vision in modern AI applications
Medium
A.Image compression
B.Image classification
C.Object detection
D.Color normalization
Correct Answer: Object detection
Explanation:
Object detection identifies each damaged package and predicts its location, typically using a bounding box.
Incorrect! Try again.
22A traditional image classifier uses manually designed edge and texture descriptors, while a convolutional neural network is trained on raw images. What is the main advantage of the deep-learning approach?
Traditional versus deep-learning-based vision approaches
Medium
A.It eliminates the need for optimization
B.It requires no labeled training examples
C.It guarantees correct predictions on new data
D.It learns task-specific features from data
Correct Answer: It learns task-specific features from data
Explanation:
Deep networks can learn hierarchical features directly from training data instead of relying mainly on manually engineered descriptors.
Incorrect! Try again.
23An RGB image has dimensions and uses 8 bits for each channel value. How much uncompressed storage does it require?
Image fundamentals
Medium
A.65,536 bytes
B.32,768 bytes
C.16,384 bytes
D.49,152 bytes
Correct Answer: 49,152 bytes
Explanation:
The image contains channel values. At one byte per value, it requires 49,152 bytes.
Incorrect! Try again.
24A grayscale image uses pixel values from 0 to 255. If a pixel changes from 40 to 200, what is the most direct interpretation?
Pixels
Medium
A.The pixel becomes brighter
B.The pixel becomes more saturated
C.The image gains another channel
D.The pixel moves to a new position
Correct Answer: The pixel becomes brighter
Explanation:
In a standard grayscale image, larger pixel values represent greater intensity and therefore a brighter appearance.
Incorrect! Try again.
25A model expects input tensors in the shape . How should an RGB image stored as be rearranged?
Channels
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
For channel-first input, the three RGB channels must precede the height and width dimensions.
Incorrect! Try again.
26A vision system must detect brightly colored road signs under varying illumination. Which color space is useful for separating color type from brightness?
Color spaces
Medium
A.RGB
B.HSV
C.Grayscale
D.CMYK
Correct Answer: HSV
Explanation:
HSV separates hue and saturation from value, making color-based filtering less directly dependent on brightness.
Incorrect! Try again.
27A image is resized directly to without preserving its aspect ratio. What is the most likely effect?
Resizing
Medium
A.The image may gain extra channels
B.Pixel values may become binary
C.Objects may appear geometrically distorted
D.Colors may be converted to grayscale
Correct Answer: Objects may appear geometrically distorted
Explanation:
The original aspect ratio is , while the target is square. Direct resizing therefore stretches or compresses objects.
Incorrect! Try again.
28During training, random crops are taken from large images before classification. What is a likely benefit of this procedure?
Cropping
Medium
A.It guarantees balanced class counts
B.It converts labels into probabilities
C.It preserves every border pixel
D.It improves robustness to object position
Correct Answer: It improves robustness to object position
Explanation:
Random cropping exposes the model to shifted and partial views, reducing dependence on a fixed object position.
Incorrect! Try again.
29Pixel intensities are stored as integers from 0 to 255. Which transformation maps them linearly to the interval ?
Normalization
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
This transformation maps to , to , and to .
Incorrect! Try again.
30A dense layer receives 64 input features and produces 10 outputs, with one bias per output. How many trainable parameters does it contain?
Neural network basics
Medium
A.640
B.740
C.650
D.704
Correct Answer: 650
Explanation:
The layer has weights and 10 biases, giving parameters.
Incorrect! Try again.
31A perceptron computes and outputs 1 when , otherwise 0. What is its output for and ?
Perceptron
Medium
A.0, because
B.0, because
C.1, because
D.1, because
Correct Answer: 1, because
Explanation:
Substitution gives . Since , the perceptron outputs 1.
Incorrect! Try again.
32Why can a feedforward network with nonlinear hidden layers represent decision boundaries that a single perceptron cannot?
Composing nonlinear transformations allows a network to model complex, nonlinearly separable relationships.
Incorrect! Try again.
33For the ReLU activation , what gradient is normally used during backpropagation when ?
Activation functions
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
ReLU is constant at zero for negative inputs, so its derivative is zero when .
Incorrect! Try again.
34The output layer of a network must produce probabilities for five mutually exclusive classes. Which activation is most appropriate?
Activation functions
Medium
A.Sigmoid
B.Leaky ReLU
C.Softmax
D.ReLU
Correct Answer: Softmax
Explanation:
Softmax converts the five logits into nonnegative values that sum to 1, matching a mutually exclusive class distribution.
Incorrect! Try again.
35A three-class classifier predicts probabilities , and the true class is the second class. What is the categorical cross-entropy loss for this sample?
Loss functions
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Categorical cross-entropy uses the negative logarithm of the probability assigned to the true class, which is 0.2.
Incorrect! Try again.
36A model predicts continuous bounding-box coordinates. Which loss is commonly suitable for measuring basic coordinate regression error?
Loss functions
Medium
A.Negative log-likelihood
B.Categorical cross-entropy
C.Binary cross-entropy
D.Mean squared error
Correct Answer: Mean squared error
Explanation:
Mean squared error directly penalizes differences between predicted and target continuous coordinate values.
Incorrect! Try again.
37A parameter has value , its gradient is , and gradient descent uses a learning rate of . What is the updated parameter value?
Optimization methods
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Gradient descent applies .
Incorrect! Try again.
38Training loss oscillates strongly and sometimes increases after parameter updates. Which adjustment is the most reasonable first response?
Optimization methods
Medium
A.Decrease the learning rate
B.Remove the loss function
C.Increase the learning rate
D.Freeze every model parameter
Correct Answer: Decrease the learning rate
Explanation:
A learning rate that is too large can overshoot useful parameter values, causing unstable or oscillating loss.
Incorrect! Try again.
39A small medical-image dataset contains only a few hundred labeled samples. Which strategy best uses a deep-learning model while reducing data requirements?
Traditional versus deep-learning-based vision approaches
Medium
A.Use test images as training labels
B.Fine-tune a pretrained vision model
C.Train a large model from random weights
D.Replace all images with edge histograms
Correct Answer: Fine-tune a pretrained vision model
Explanation:
A pretrained model already contains useful visual features, so fine-tuning usually requires fewer labeled examples than training from scratch.
Incorrect! Try again.
40A pretrained model was trained using per-channel mean and standard deviation normalization. What is the likely consequence of supplying only raw 0-to-255 pixel values during inference?
Normalization
Medium
A.The input distribution will differ from training
B.The output classes will become perfectly balanced
C.The model will automatically add new channels
D.The image resolution will increase automatically
Correct Answer: The input distribution will differ from training
Explanation:
Preprocessing must match training conditions. Raw values can produce activation patterns unlike those seen during training and reduce accuracy.
Incorrect! Try again.
41A calibrated disease-screening model is deployed in a population where disease prevalence is much lower than in the validation population. Assume the class-conditional score distributions remain unchanged. Which consequence is most likely if the original decision threshold is retained?
Role of computer vision in modern AI applications
Hard
A.Sensitivity and specificity remain similar, but positive predictive value decreases
B.Specificity decreases, while sensitivity and positive predictive value remain similar
C.Sensitivity decreases, while specificity and positive predictive value remain similar
D.Sensitivity and specificity increase, but positive predictive value decreases
Correct Answer: Sensitivity and specificity remain similar, but positive predictive value decreases
Explanation:
With unchanged class-conditional distributions and threshold, sensitivity and specificity stay approximately fixed. Lower prevalence reduces the fraction of true positives among positive predictions, so positive predictive value decreases.
Incorrect! Try again.
42A manufacturer must classify parts from only 80 labeled images. Parts may rotate arbitrarily, and engineers know that edge-orientation distributions are highly diagnostic. Which approach has the strongest inductive bias for this setting?
Traditional versus deep-learning-based vision approaches
Hard
A.A pixel-level nearest-neighbor classifier using raw Euclidean distance
B.A rotation-invariant handcrafted descriptor followed by a regularized linear classifier
C.A fully connected network trained on flattened images with dropout
D.A large unconstrained CNN trained from random initialization without augmentation
Correct Answer: A rotation-invariant handcrafted descriptor followed by a regularized linear classifier
Explanation:
With very little data and known rotational invariance, an engineered invariant descriptor can encode the required prior directly. An unconstrained deep model would generally need more data, augmentation, or pretraining.
Incorrect! Try again.
43An image stored as an interleaved HWC array is passed to a framework expecting CHW format. The programmer uses reshape(C, H, W) instead of transposing axes. What is the principal result?
Image fundamentals
Hard
A.Pixel values are normalized correctly, but channel means are exchanged
B.Values are reinterpreted in the wrong channel-spatial order without moving data correctly
C.Channels are reordered correctly, but each spatial axis is reversed
D.The image is transposed correctly, but its memory becomes noncontiguous
Correct Answer: Values are reinterpreted in the wrong channel-spatial order without moving data correctly
Explanation:
reshape changes index interpretation while preserving linear element order; it does not perform the axis permutation required to convert HWC data into CHW data.
Incorrect! Try again.
44An RGBA image contains fully transparent pixels whose stored RGB values are bright red. It is resized using bilinear interpolation and later composited over black. Which procedure best prevents red fringes near opaque object boundaries?
Pixels
Hard
A.Discard RGB in opaque pixels, interpolate alpha alone, then reconstruct boundary colors
B.Interpolate straight RGB and alpha independently, then clamp RGB to the alpha value
C.Premultiply RGB by alpha, interpolate all components, then unpremultiply where alpha is nonzero
D.Convert alpha to a binary mask, resize RGB normally, then blur the resized mask
Correct Answer: Premultiply RGB by alpha, interpolate all components, then unpremultiply where alpha is nonzero
Explanation:
Premultiplied alpha ensures fully transparent pixels contribute zero color during interpolation. Interpolating straight RGB can mix hidden red values into partially transparent boundary pixels.
Incorrect! Try again.
45Ignoring biases, compare a standard convolution with 32 input channels and 64 output channels against a depthwise-separable version with a depthwise stage and a pointwise stage. How many weights does the separable version use?
Channels
Hard
A. weights instead of
B. weights instead of
C. weights instead of
D. weights instead of
Correct Answer: weights instead of
Explanation:
The depthwise stage uses weights, and the pointwise stage uses . Their total is , versus .
Incorrect! Try again.
46A black pixel and a white pixel, represented by sRGB values 0 and 1, are averaged. Approximately what sRGB value represents their physically correct equal-energy mixture, assuming the usual sRGB transfer function?
Color spaces
Hard
A., because encoded sRGB values are proportional to light intensity
B., because the sRGB transfer function squares the arithmetic mean
C., because equal-energy mixing preserves the brighter endpoint
D., because averaging should occur after conversion to linear light
Correct Answer: , because averaging should occur after conversion to linear light
Explanation:
The linear-light average is . Encoding that value with the sRGB transfer function gives approximately ; directly averaging encoded values produces an image that is too dark.
Incorrect! Try again.
47A one-pixel black-and-white checkerboard is downsampled by a factor of 8. Which operation most directly prevents aliasing while preserving the correct average intensity?
Resizing
Hard
A.Apply an appropriate low-pass filter before subsampling
B.Increase contrast before selecting every eighth source pixel
C.Apply nearest-neighbor sampling followed by edge sharpening
D.Subsample first and then apply a Gaussian smoothing filter
Correct Answer: Apply an appropriate low-pass filter before subsampling
Explanation:
Downsampling lowers the Nyquist limit. Frequencies above the new limit must be removed before samples are discarded; post-subsampling smoothing cannot undo aliasing already introduced.
Incorrect! Try again.
48An image of size is cropped using the rectangle with top-left corner and size . A bounding box in the original image is in format. After clipping to the crop and converting to crop-local coordinates, what is the box?
Cropping
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The original box is clipped at the crop's left boundary , producing . Subtracting the crop origin gives .
Incorrect! Try again.
49A pretrained network expects channel normalization , but deployment supplies . Retraining is unavailable. Which modification can exactly preserve the network's output, assuming normalization is channelwise affine and the first layer is affine?
Normalization
Hard
A.Adjust only the final layer's bias using the difference between the two channel means
B.Reparameterize the first layer's channelwise weights and bias to absorb the affine mismatch
C.Scale every hidden-layer bias by while leaving weights unchanged
D.Replace the first activation with softmax to make the network invariant to normalization
Correct Answer: Reparameterize the first layer's channelwise weights and bias to absorb the affine mismatch
Explanation:
The expected input is an affine function of the supplied input. Composing that transformation with the first affine layer yields adjusted first-layer weights and bias that preserve all subsequent activations.
Incorrect! Try again.
50Every neuron in a hidden layer is initialized with the same weight vector and bias. Under deterministic full-batch gradient descent, what typically happens to those neurons?
Neural network basics
Hard
A.They remain identical because they receive identical gradients, reducing the effective layer width
B.They specialize automatically because each neuron receives a different loss derivative
C.They become orthogonal because gradient descent implicitly decorrelates equal features
D.They remain identical only until the first bias update, after which symmetry is broken
Correct Answer: They remain identical because they receive identical gradients, reducing the effective layer width
Explanation:
Identical neurons produce identical outputs and receive identical gradients. Without a symmetry-breaking source, their parameters evolve identically and the layer behaves like repeated copies of one neuron.
Incorrect! Try again.
51A single perceptron with a threshold activation must classify the four binary inputs so that and are positive, while and are negative. Which statement is correct?
Perceptron
Hard
A.No weights and bias can satisfy the labels because the positive set is not linearly separable
B.The classifier exists with equal positive weights and a threshold between 0 and 1
C.The classifier exists with opposite-signed weights and a zero decision threshold
D.No classifier exists only because the perceptron activation is nondifferentiable
Correct Answer: No weights and bias can satisfy the labels because the positive set is not linearly separable
Explanation:
This is the XNOR labeling. Its two positive corners cannot be separated from the other two corners by a single linear decision boundary, regardless of how the perceptron is trained.
Incorrect! Try again.
52Consider with no activation between the two affine layers. If the hidden width is , which statement best characterizes the resulting mapping?
Feedforward networks
Hard
A.It is nonlinear, and its Jacobian rank is always exactly
B.It is affine, and its linear component has rank at most
C.It is quadratic, and its Hessian rank is at most
D.It is affine, and its linear component always has full rank
Correct Answer: It is affine, and its linear component has rank at most
Explanation:
The layers collapse to . Since factors through an -dimensional hidden space, its rank cannot exceed .
Incorrect! Try again.
53For a leaky ReLU with negative slope , what weight variance approximately preserves activation variance in a wide layer whose zero-mean inputs are symmetric, under the usual independence assumptions?
Activation functions
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
For symmetric inputs, the positive and negative branches contribute factors and with approximately equal probability. The generalized He variance compensates for their average squared gain.
Incorrect! Try again.
54For -class cross-entropy with label smoothing target , what probabilities minimize the expected loss for a single deterministic training label, assuming the model can represent any distribution?
Loss functions
Hard
A. and
B. and
C. and
D. and
Correct Answer: and
Explanation:
Cross-entropy is minimized when the predicted distribution equals the target distribution. Under the stated convention, the true class receives both the one-hot mass and its share of the uniform mass.
Incorrect! Try again.
55Why is adding an penalty to the loss generally not equivalent to decoupled weight decay when using Adam?
Optimization methods
Hard
A.Adam differentiates the penalty twice, while decoupled decay differentiates it once
B.Adam removes momentum from the penalty, while decoupled decay adds separate momentum
C.Adam adaptively rescales the penalty gradient, while decoupled decay directly scales parameters
D.Adam applies the penalty only to biases, while decoupled decay applies it only to weights
Correct Answer: Adam adaptively rescales the penalty gradient, while decoupled decay directly scales parameters
Explanation:
With an loss term, the gradient contribution is processed by Adam's adaptive preconditioner. AdamW-style decay instead applies parameter shrinkage separately, so the two updates generally differ.
Incorrect! Try again.
56A vision pipeline converts an RGB image to YCbCr 4:2:0 before storage. Which spatial information is reduced by this representation?
Color spaces
Hard
A.Chrominance resolution is halved only in the vertical direction
B.Chrominance resolution is halved in both horizontal and vertical directions
C.All three channels are halved only in the horizontal direction
D.Luminance resolution is halved in both horizontal and vertical directions
Correct Answer: Chrominance resolution is halved in both horizontal and vertical directions
Explanation:
In 4:2:0 sampling, each chroma channel has one sample for each block of luminance samples. Luminance retains full spatial resolution.
Incorrect! Try again.
57An image of size is letterboxed into a input while preserving aspect ratio and centering the result. Under the scale-and-pad convention, how should a point be transformed?
Resizing
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The uniform scale is . The resized image is approximately , leaving total vertical padding , or on each side.
Incorrect! Try again.
58A CNN with batch normalization is trained correctly, but during inference each batch contains only one highly atypical image and the layer is accidentally left in training mode. What failure is most directly expected?
Normalization
Hard
A.Predictions use stored means but recompute only the learned scale parameter
B.Weights are permanently overwritten by the atypical image during the forward pass
C.Gradients vanish because batch normalization cannot process a batch of size one
D.Predictions depend on unstable per-batch statistics instead of stored population estimates
Correct Answer: Predictions depend on unstable per-batch statistics instead of stored population estimates
Explanation:
Training-mode batch normalization uses current batch statistics. With a batch size of one, these estimates can be unrepresentative or degenerate, making predictions unstable and input-dependent.
Incorrect! Try again.
59For binary classification with logit , which expression computes binary cross-entropy stably without explicitly evaluating or ?
Loss functions
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
This softplus-based form is algebraically equivalent to binary cross-entropy with logits while avoiding overflow for large positive logits and underflow for large negative logits.
Incorrect! Try again.
60Four microbatches are used to emulate one large batch. Their gradients are summed, and the optimizer performs one SGD update with momentum. Under what adjustment does this match using the mean gradient of the combined large batch, assuming no batch-dependent layers?
Optimization methods
Hard
A.Divide both the learning rate and momentum coefficient by four
B.Multiply the momentum coefficient by four before the optimizer step
C.Perform four momentum updates while delaying only the parameter assignment
D.Divide the accumulated gradient by four before the single optimizer step
Correct Answer: Divide the accumulated gradient by four before the single optimizer step
Explanation:
The gradient of the combined batch mean is the average of the four equal-sized microbatch gradients. Momentum must be updated once using that average to reproduce one large-batch optimizer step.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →