Unit 3: Classifying Images with Deep Convolutional Neural Networks - Practice Quiz

INT422 — Deep Learning 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Which CNN layer applies learnable filters to detect local image features?

Building blocks of convolutional neural networks Easy
A. Output layer
B. Pooling layer
C. Dropout layer
D. Convolutional layer

2 Which activation function is commonly used in convolutional neural networks to introduce nonlinearity?

Building blocks of convolutional neural networks Easy
A. Argmax
B. Identity
C. Softmax
D. ReLU

3 An image has width , a filter has width , the stride is , and no padding is used. What is the output width?

Determining the size of the convolution output Easy
A.
B.
C.
D.

4 For an input size , filter size , padding , and stride , which formula gives the convolution output size?

Determining the size of the convolution output Easy
A.
B.
C.
D.

5 What operation is performed between a 2D filter and an image region during convolution?

Performing a discrete convolution in 2D Easy
A. Element-wise multiplication followed by summation
B. Pixel sorting followed by averaging
C. Vector division followed by subtraction
D. Matrix addition followed by normalization

6 What is the small matrix that slides across an image during a 2D convolution called?

Performing a discrete convolution in 2D Easy
A. Label
B. Batch
C. Kernel
D. Epoch

7 What is the main purpose of pooling in a convolutional neural network?

Subsampling Easy
A. Increase image resolution
B. Reduce spatial dimensions
C. Create training labels
D. Change class names

8 What does max pooling select from each local region?

Subsampling Easy
A. Average value
B. Middle value
C. Smallest value
D. Largest value

9 Which sequence represents a common basic CNN architecture for image classification?

Putting everything together to build a CNN Easy
A. Pooling, label, convolution, input
B. ReLU, prediction, image, convolution
C. Convolution, ReLU, pooling, dense output
D. Dense output, input, pooling, label

10 Which layer commonly produces class probabilities for a multi-class image classification problem?

Putting everything together to build a CNN Easy
A. Softmax output layer
B. Data augmentation layer
C. Max pooling layer
D. Convolutional input layer

11 Which TensorFlow API provides high-level tools for building neural network models?

Implementing a deep convolutional neural network using TensorFlow Easy
A. Keras
B. Pandas
C. NumPy
D. Matplotlib

12 Which Keras layer is used to perform a 2D convolution?

Implementing a deep convolutional neural network using TensorFlow Easy
A. MaxPooling2D
B. Conv2D
C. Dense
D. Flatten

13 What is transfer learning?

Transfer learning with pre-trained CNN Easy
A. Training every model from random values
B. Removing all layers before training
C. Reusing a model trained on another task
D. Converting images into text labels

14 Why are early layers of a pre-trained CNN often useful for a new image task?

Transfer learning with pre-trained CNN Easy
A. They store only class names
B. They remove every image channel
C. They detect general visual features
D. They generate random image labels

15 Which operation is a common example of image data augmentation?

Data augmentation Easy
A. Random horizontal flipping
B. Replacing labels with zeros
C. Deleting every training image
D. Fixing all pixels to one value

16 What is a primary benefit of data augmentation?

Data augmentation Easy
A. It makes every image identical
B. It removes the need for labels
C. It guarantees perfect accuracy
D. It helps reduce overfitting

17 What does image segmentation typically assign to each pixel?

Image segmentation Easy
A. A class label
B. A batch number
C. A file name
D. A learning rate

18 Which task divides an image into meaningful regions such as road, sky, and vehicle?

Image segmentation Easy
A. Batch normalization
B. Feature scaling
C. Semantic segmentation
D. Image compression

19 Which command displays NVIDIA GPU utilization, memory usage, and running processes?

NVIDIA Command Line Tools and Utilities Easy
A. pip show
B. python --help
C. nvcc --version
D. nvidia-smi

20 Which command can be used to display the installed NVIDIA CUDA compiler version?

NVIDIA Command Line Tools and Utilities Easy
A. python --version
B. nvcc --version
C. nvidia-smi -L
D. git --version

21 An input tensor has shape . A convolutional layer applies 12 filters of size with stride 1 and same padding. What is the output shape?

Building blocks of convolutional neural networks Medium
A.
B.
C.
D.

22 Why is a ReLU activation commonly placed after a convolutional layer?

Building blocks of convolutional neural networks Medium
A. It normalizes every channel to unit variance
B. It determines the number of convolutional filters
C. It introduces nonlinearity into the learned features
D. It replaces convolution by calculating a weighted average over every pixel in the complete input image

23 A image is convolved with a filter using stride 1 and no padding. What is the spatial size of the output?

Determining the size of the convolution output Medium
A.
B.
C.
D.

24 A one-dimensional input of size 31 is processed using a filter of size 3, padding 1, and stride 2. What is the output size?

Determining the size of the convolution output Medium
A. 31
B. 15
C. 17
D. 16

25 Using the cross-correlation convention commonly used by CNN libraries, what is the result of applying the kernel to the image patch ?

Performing a discrete convolution in 2D Medium
A.
B.
C.
D.

26 A CNN applies the kernel to the image patch . What output value is produced?

Performing a discrete convolution in 2D Medium
A.
B.
C.
D.

27 A max-pooling operation with stride 2 is applied to the input . What is the output?

Subsampling Medium
A.
B.
C.
D.

28 A feature map is processed by a pooling layer with stride 2 and no padding. What is the output size?

Subsampling Medium
A. , because pooling preserves all spatial positions while only reducing channel depth
B.
C.
D.

29 A CNN produces a feature map before classification. Which change most directly reduces the number of parameters in the classifier while retaining one value per feature channel?

Putting everything together to build a CNN Medium
A. Replace flattening with global average pooling
B. Replace ReLU with a sigmoid activation
C. Add another fully connected hidden layer
D. Increase the feature map to

30 Which layer sequence is most appropriate for a basic CNN image classifier?

Putting everything together to build a CNN Medium
A. Pooling, softmax, convolution, dense, ReLU
B. Dense, pooling, convolution, softmax, ReLU
C. Convolution, ReLU, pooling, dense, softmax
D. Softmax, convolution, flattening, pooling, dense

31 In TensorFlow, a Conv2D layer has 32 filters of size , uses a bias, and receives an RGB input. How many trainable parameters does it have?

Implementing a deep convolutional neural network using TensorFlow Medium
A. 896
B. 928
C. 864
D. 1024

32 A TensorFlow classifier outputs probabilities for 10 classes, and the target labels are integers from 0 to 9. Which loss is most appropriate?

Implementing a deep convolutional neural network using TensorFlow Medium
A. CategoricalCrossentropy after converting every input image into a one-hot encoded feature vector before convolution
B. SparseCategoricalCrossentropy
C. MeanSquaredError
D. BinaryCrossentropy

33 You have a small dataset of labeled flower images and a CNN pre-trained on ImageNet. What is a suitable first transfer-learning strategy?

Transfer learning with pre-trained CNN Medium
A. Randomize all pre-trained weights and train every layer
B. Remove the convolutional base and use raw pixels directly
C. Freeze the new classifier and update only its biases
D. Freeze the convolutional base and train a new classifier

34 After training a new classification head on top of a frozen pre-trained model, what is an appropriate fine-tuning procedure?

Transfer learning with pre-trained CNN Medium
A. Unfreeze selected upper layers and use a low learning rate
B. Keep every layer frozen and increase the number of epochs
C. Unfreeze all layers and use a very high learning rate
D. Delete the trained classification head and restart randomly

35 A dataset contains images of handwritten digits 6 and 9. Which augmentation is most likely to create incorrectly labeled training examples?

Data augmentation Medium
A. Mild brightness adjustment
B. Small horizontal translation
C. Slight random zoom
D. image rotation

36 How should random data augmentation normally be used when estimating a model's validation accuracy?

Data augmentation Medium
A. Apply identical random changes to every split
B. Generate validation examples from heavily transformed training images so that both sets contain nearly identical samples
C. Apply it only to training examples
D. Apply it only to validation examples

37 A binary segmentation model receives images and predicts one foreground probability per pixel. What should its output shape be for each image?

Image segmentation Medium
A.
B.
C.
D.

38 What is the main purpose of skip connections between the encoder and decoder in a U-Net?

Image segmentation Medium
A. Recover fine spatial details lost during downsampling
B. Convert segmentation into image-level classification
C. Eliminate the need for nonlinear activation functions
D. Force all intermediate feature maps to contain only one channel

39 Which NVIDIA command is commonly used to inspect GPU utilization, memory usage, temperature, and active GPU processes?

NVIDIA Command Line Tools and Utilities Medium
A. cuda-gdb
B. nvidia-smi
C. nvidia-smi followed by recompiling every CUDA source file to determine which kernel generated each memory allocation
D. nvcc --version

40 A developer wants to check the installed NVIDIA CUDA compiler version. Which command should be used?

NVIDIA Command Line Tools and Utilities Medium
A. nvidia-debugdump --list
B. cuda-gdb --pid
C. nvidia-smi -q
D. nvcc --version

41 A convolution receives an input of spatial size . It uses a kernel, dilation , stride , and padding . What is the output spatial size?

Determining the size of the convolution output Hard
A.
B.
C.
D.

42 TensorFlow applies a 1D convolution to an input of length using kernel size , stride , dilation , and padding='same'. What output length and total padding are used?

Determining the size of the convolution output Hard
A. Output length with total padding
B. Output length with total padding
C. Output length with total padding
D. Output length , because same padding always preserves the input length even when the stride exceeds one

43 Given input and kernel , what is the top-left output of a true mathematical 2D convolution with unit stride and no padding?

Performing a discrete convolution in 2D Hard
A.
B.
C.
D.

44 A grouped convolution has input channels, output channels, a kernel, groups, and one bias per output channel. How many trainable parameters does it contain?

Building blocks of convolutional neural networks Hard
A.
B.
C.
D.

45 Starting from a single input pixel receptive field, a network applies: a convolution with stride , a pooling layer with stride , and a convolution with dilation and stride . What is the final receptive-field size along one spatial dimension?

Building blocks of convolutional neural networks Hard
A.
B.
C.
D.

46 Why can a one-pixel translation of an input fail to produce a corresponding translation after non-overlapping max pooling with stride ?

Subsampling Hard
A. The maximum operator is linear only for nonnegative feature maps
B. Every translated maximum remains in its original pooled cell because max pooling is exactly translation invariant at all integer shifts
C. Pooling windows are tied to a fixed sampling grid
D. Max pooling converts spatial translations into channel permutations

47 A feature map contains substantial energy above the Nyquist frequency of a planned stride- downsampling operation. Which modification most directly reduces aliasing?

Subsampling Hard
A. Apply a high-pass filter before downsampling
B. Increase channel count after downsampling
C. Apply a low-pass filter before downsampling
D. Apply batch normalization after downsampling

48 A final convolutional feature tensor has shape , and the classifier has outputs. By how many parameters does global average pooling followed by a dense layer reduce the parameter count compared with flattening followed by the same dense layer, including biases?

Putting everything together to build a CNN Hard
A.
B.
C.
D.

49 A TensorFlow classification model ends with Dense(C) and no activation, while labels are integer class indices. Which loss configuration is mathematically consistent?

Implementing a deep convolutional neural network using TensorFlow Hard
A. CategoricalCrossentropy(from_logits=False)
B. SparseCategoricalCrossentropy(from_logits=False)
C. BinaryCrossentropy(from_logits=True)
D. SparseCategoricalCrossentropy(from_logits=True)

50 In a custom TensorFlow training loop, the model contains dropout, batch normalization, and kernel regularizers. Which computation correctly forms the training loss inside GradientTape?

Implementing a deep convolutional neural network using TensorFlow Hard
A. logits = model(x, training=False); loss = data_loss(y, logits)
B. logits = model(x, training=False); loss = data_loss(y, logits) + tf.add_n(model.losses)
C. logits = model(x, training=True); loss = data_loss(y, logits) + tf.add_n(model.losses)
D. logits = model(x, training=True); loss = data_loss(y, logits) - tf.add_n(model.losses)

51 A residual block receives a tensor. Its main branch produces a tensor using a stride- convolution. What shortcut operation permits elementwise addition while introducing the fewest convolution parameters?

Putting everything together to build a CNN Hard
A. A convolution with stride and filters
B. A convolution with stride and filters
C. A max pool followed by zero-padding to channels
D. A convolution with stride and filters

52 During fine-tuning of a small dataset, a pre-trained backbone is unfrozen, but its batch-normalization statistics should remain fixed. Which approach is most appropriate?

Transfer learning with pre-trained CNN Hard
A. Delete batch-normalization layers and replace each one with dropout
B. Unfreeze selected layers but invoke the backbone with training=False
C. Keep the backbone frozen permanently, because batch-normalization statistics cannot remain fixed once any convolutional layer becomes trainable
D. Unfreeze every layer and invoke the backbone with training=True

53 After changing several backbone layers from trainable=False to trainable=True in a compiled Keras model, what should be done before continuing training?

Transfer learning with pre-trained CNN Hard
A. Replace the optimizer with a non-gradient-based optimizer
B. Run one inference epoch before resuming optimization
C. Recompile the model with a suitably small learning rate
D. Reset all newly trainable layers to random initialization

54 For semantic-segmentation training, an image and its integer-valued class mask undergo random rotation and resizing. Which interpolation policy is correct?

Data augmentation Hard
A. Use nearest-neighbor interpolation for the image and bilinear interpolation for the mask
B. Use bilinear interpolation for both and round the mask values afterward
C. Use bicubic interpolation for both the image and the integer mask
D. Use bilinear interpolation for the image and nearest-neighbor interpolation for the mask

55 MixUp forms for examples from different classes. If the original labels are sparse integers, what target and loss should be used?

Data augmentation Hard
A. The first integer target with categorical cross-entropy
B. Rounded integer targets with sparse cross-entropy
C. Two independent integer targets with binary cross-entropy
D. Mixed one-hot targets with categorical cross-entropy

56 A segmentation dataset uses label for pixels that must not contribute to training. What is the correct way to compute sparse cross-entropy?

Image segmentation Hard
A. Mask ignored pixels and average loss over valid pixels
B. Compute all pixel losses and set the final scalar loss to zero when any ignored pixel occurs
C. Map label to class before computing loss
D. Clip label to the highest valid class index

57 A segmentation backbone has output stride . Its final stage begins with a stride- convolution. Which modification most plausibly changes the output stride to while approximately preserving the final receptive field?

Image segmentation Hard
A. Change that stride to and bilinearly upsample the final features
B. Keep the stride at and use dilation in all earlier kernels
C. Change that stride to and reduce subsequent kernels to
D. Change that stride to and use dilation in subsequent kernels

58 A model assigns exactly one of classes to every pixel, including background. Which output and decoding scheme best matches this mutually exclusive formulation?

Image segmentation Hard
A. logits per pixel followed by argmax
B. sigmoid probabilities followed by independent thresholds
C. One scalar per pixel followed by rounding modulo
D. logits followed by independent binary decisions

59 The environment variable is set as CUDA_VISIBLE_DEVICES=2,5 before launching TensorFlow. Assuming both GPUs are available, how are they identified inside the process?

NVIDIA Command Line Tools and Utilities Hard
A. Physical GPU becomes logical GPU , and physical GPU becomes logical GPU
B. TensorFlow sees every physical GPU but schedules operations only on GPUs and after retaining the original global device numbering
C. Physical GPU becomes logical GPU , and physical GPU becomes logical GPU
D. Physical GPU remains logical GPU , and physical GPU remains logical GPU

60 A custom TensorFlow CUDA operation intermittently performs an out-of-bounds device-memory access. Which command is most directly suited to locating the invalid access?

NVIDIA Command Line Tools and Utilities Hard
A. compute-sanitizer --tool memcheck python train.py
B. nsys stats python train.py
C. nvidia-smi --query-gpu=memory.used --format=csv
D. nvcc --ptxas-options=-v train.py