Deep Learning Fundamentals Assessment — Questions and Answers
Question 1: What is the main purpose of 1×1 convolutions in deep CNN architectures?
- Add non-linearity without changing spatial dimensions
- Apply spatial pooling
- Perform channel-wise linear combinations to reduce or expand depth cheaply (Correct answer)
- Increase spatial resolution
Correct answer: Perform channel-wise linear combinations to reduce or expand depth cheaply
1×1 convolutions mix information across channels without affecting spatial dimensions, enabling dimensionality reduction (bottleneck) or expansion at low computational cost.
Question 2: What type of tasks are RNNs / LSTMs most naturally suited for?
- Clustering unlabeled datasets
- Static image classification
- Sequential and time-series tasks such as language modeling, speech recognition, and forecasting (Correct answer)
- Graph-structured data
Correct answer: Sequential and time-series tasks such as language modeling, speech recognition, and forecasting
RNNs and LSTMs are designed for sequential data where order matters, making them well-suited for text, audio, time series, and other temporal tasks.
Question 3: What is the Fréchet Inception Distance (FID) used to measure?
- The quality and diversity of generated images by comparing statistics of generated and real image feature distributions (Correct answer)
- Training speed of generative models in FLOPS
- The distance between two points in latent space
- Discriminator accuracy in GAN training
Correct answer: The quality and diversity of generated images by comparing statistics of generated and real image feature distributions
FID measures the Fréchet distance between Inception feature distributions of real and generated images, with lower values indicating more realistic and diverse generated samples.
Question 4: How does an encoder-decoder architecture with attention differ from one without attention?
- Attention removes the encoder entirely
- Attention replaces the recurrent decoder with a feedforward network
- Attention allows the decoder to look at all encoder hidden states rather than only a single context vector (Correct answer)
- Attention adds convolutional layers to the decoder
Correct answer: Attention allows the decoder to look at all encoder hidden states rather than only a single context vector
Attention mechanisms let the decoder compute a weighted combination of all encoder hidden states at each decoding step, overcoming the bottleneck of a single fixed context vector.
Question 5: What is the vanishing gradient problem particularly severe for in RNNs?
- Single-step predictions
- Short sequences of 3–5 tokens
- Long-range dependencies spanning many time steps (Correct answer)
- Batch normalization in recurrent layers
Correct answer: Long-range dependencies spanning many time steps
In RNNs, gradients must be backpropagated through many time steps, causing them to shrink exponentially and preventing the network from learning long-range dependencies.
Question 6: What distinguishes a recurrent neural network (RNN) from a feedforward network?
- RNNs have feedback connections that carry hidden state across time steps (Correct answer)
- RNNs only process fixed-size inputs
- RNNs have no activation functions
- RNNs use convolutional operations
Correct answer: RNNs have feedback connections that carry hidden state across time steps
RNNs pass a hidden state from one time step to the next, allowing the network to maintain memory of previous inputs in a sequence.
Question 7: What is mode collapse in GAN training?
- The generator producing only a few distinct outputs rather than the full data distribution (Correct answer)
- The discriminator loss collapsing to zero
- The GAN failing to converge during early training
- The discriminator ignoring generated samples
Correct answer: The generator producing only a few distinct outputs rather than the full data distribution
Mode collapse occurs when the generator learns to produce a limited variety of outputs that fool the discriminator, ignoring most modes of the real data distribution.
Question 8: Which approach is the core idea behind Model-Agnostic Meta-Learning (MAML)?
- Replacing gradient descent with evolutionary algorithms
- Learning an initialization of model parameters that can be quickly adapted to new tasks with few gradient steps (Correct answer)
- Pre-training a model on a fixed large dataset and never updating it
- Using an ensemble of pre-trained models without fine-tuning
Correct answer: Learning an initialization of model parameters that can be quickly adapted to new tasks with few gradient steps
MAML meta-trains model parameters to lie in a region of the loss landscape from which a small number of gradient updates on a new task leads to strong performance, enabling fast adaptation.
Question 9: What is 'zero-shot learning' in deep learning?
- Training with zero regularization
- Skipping the validation step during model training
- A model's ability to recognize or solve tasks it has never explicitly seen during training (Correct answer)
- Training a model without any data augmentation
Correct answer: A model's ability to recognize or solve tasks it has never explicitly seen during training
Zero-shot learning enables a model to generalize to unseen classes or tasks at inference time by leveraging semantic descriptions, attribute vectors, or language embeddings learned during training.
Question 10: What does the term 'context window' refer to in a large language model?
- The model's training dataset size
- The maximum number of tokens the model can process in a single forward pass (Correct answer)
- The number of attention heads in the model
- The sliding window used during data preprocessing
Correct answer: The maximum number of tokens the model can process in a single forward pass
The context window is the maximum sequence length a model can handle at once; information outside the context window is not accessible to the model during generation.
Question 11: Class imbalance is severe: 99% negative, 1% positive. Which combination best supports training a useful classifier?
- Removing all negative examples
- Standard cross-entropy evaluated with accuracy
- Class-weighted loss or resampling, evaluated with precision-recall metrics (Correct answer)
- Training longer with the same setup
Correct answer: Class-weighted loss or resampling, evaluated with precision-recall metrics
Weighting or resampling counteracts the imbalance, and precision-recall metrics reveal minority-class performance that accuracy hides.
Question 12: Which of the following statements describes early stopping the best?
- Train the network until a local minimum in the error function is reached
- Simulate the network on a test dataset after every epoch of training. Stop training when the generalization error starts to increase (Correct answer)
- A faster version of backpropagation, such as the `Quickprop’ algorithm
- Add a momentum term to the weight update in the Generalized Delta Rule, so that training converges more quickly
Correct answer: Simulate the network on a test dataset after every epoch of training. Stop training when the generalization error starts to increase
Early stopping is a regularization technique that prevents overfitting by monitoring the model's performance on a separate validation dataset during training. Training continues as long as the validation error decreases. When the validation error begins to increase, indicating that the model is starting to overfit the training data, training is halted, and the model weights from the epoch with the best validation performance are typically restored.
Question 13: We specify a metric called bayes error, which is the error we expect to attain, instead of trying to reach absolute zero error. What is the rationale for employing Bayes error?
- System (that creates input-output mapping) may be stochastic
- All the above (Correct answer)
- Limited training data
- Input variables may not contain complete information about the output variable
Correct answer: All the above
Bayes error represents the theoretical minimum error rate for a given problem, which no model can surpass. We use it as a benchmark because real-world data often contains inherent noise, ambiguity, or incomplete information due to limited training data, input variables not fully capturing the output, or the underlying system being stochastic. Therefore, aiming for absolute zero error is often unrealistic, and Bayes error provides a practical lower bound for model performance.
Question 14: What is the Wasserstein GAN (WGAN) designed to address?
- Training instability and mode collapse by using the Wasserstein distance as a more stable loss (Correct answer)
- Mode collapse in image synthesis
- Slow convergence in the discriminator
- Class-conditional generation without labels
Correct answer: Training instability and mode collapse by using the Wasserstein distance as a more stable loss
WGAN replaces the standard GAN loss with the Wasserstein distance (Earth Mover's distance), providing more meaningful gradients even when generator and real distributions don't overlap.
Question 15: What is the purpose of pooling layers in a CNN?
- Apply non-linear activations
- Increase spatial resolution
- Downsample feature maps to reduce computation and add spatial invariance (Correct answer)
- Normalize feature map values
Correct answer: Downsample feature maps to reduce computation and add spatial invariance
Pooling layers reduce spatial dimensions by aggregating values in local regions, decreasing computation and making the representation more invariant to small translations.
Question 16: What is the exploding gradient problem in RNNs?
- Activations becoming negative during training
- Gradients growing exponentially through many time steps, causing unstable large weight updates (Correct answer)
- Too many neurons being activated simultaneously
- Loss increasing to infinity due to wrong architecture
Correct answer: Gradients growing exponentially through many time steps, causing unstable large weight updates
When gradients are multiplied across many time steps, they can grow exponentially, producing extremely large weight updates that destabilize or diverge training.
Question 17: What is backpropagation through time (BPTT)?
- Evaluating the model on future data
- Applying dropout at each time step
- Using time-series data to initialize RNN weights
- Unrolling an RNN across time steps and applying backpropagation to compute gradients (Correct answer)
Correct answer: Unrolling an RNN across time steps and applying backpropagation to compute gradients
BPTT unfolds the RNN computation graph across all time steps and applies the standard backpropagation algorithm to compute gradients with respect to all shared weights.
Question 18: Why do Transformers require positional encodings?
- Self-attention is permutation-invariant and has no inherent sense of token order (Correct answer)
- They replace the need for a softmax layer
- They speed up backpropagation through time
- They reduce the memory footprint of attention
Correct answer: Self-attention is permutation-invariant and has no inherent sense of token order
Without positional encodings, attention treats the input as an unordered set, losing sequence order information.
Question 19: What is cross-validation and how is it used for model evaluation in deep learning?
- Using cross-entropy loss for validation metric only
- Evaluating the model on data from different geographic regions
- Partitioning data into k folds, training on k-1 and evaluating on 1 repeatedly to estimate generalization (Correct answer)
- Training on multiple datasets and averaging weights
Correct answer: Partitioning data into k folds, training on k-1 and evaluating on 1 repeatedly to estimate generalization
k-fold cross-validation trains and evaluates the model k times with different folds as validation, providing a lower-variance estimate of generalization performance than a single split.
Question 20: A neural network's non-linearity is caused by which of the following?
- None of these
- Rectified Linear Unit (Correct answer)
- Stochastic Gradient Descent
- Convolution function
Correct answer: Rectified Linear Unit
The non-linearity in a neural network is introduced by activation functions, such as the Rectified Linear Unit (ReLU). Without non-linear activation functions, a multi-layer neural network would simply be a series of linear transformations, equivalent to a single linear layer, regardless of its depth. Non-linearity is crucial because it allows neural networks to learn and approximate complex, non-linear relationships present in real-world data, enabling them to solve sophisticated problems.
Question 21: What is gradient clipping used for when training RNNs?
- Increasing the learning rate dynamically
- Removing neurons with zero gradients
- Preventing the loss from going below zero
- Capping gradient magnitudes to prevent exploding gradients from destabilizing training (Correct answer)
Correct answer: Capping gradient magnitudes to prevent exploding gradients from destabilizing training
Gradient clipping rescales gradients when their norm exceeds a threshold, preventing the large weight updates that cause divergence due to exploding gradients in deep or long RNNs.
Question 22: What is the key property of flow-based generative models such as RealNVP?
- They encode inputs to discrete latent codes
- They learn invertible transformations allowing exact likelihood computation and efficient sampling in both directions (Correct answer)
- They model the data distribution using a recurrent prior
- They use adversarial training between two networks
Correct answer: They learn invertible transformations allowing exact likelihood computation and efficient sampling in both directions
Flow-based models use a series of invertible (bijective) transformations with tractable Jacobians, enabling exact log-likelihood evaluation and straightforward sampling by inverting the flow.
Question 23: What does the reparameterization trick in VAEs enable?
- Increasing the dimensionality of the latent space during training
- Using a different activation function in the encoder
- Replacing the KL divergence term with cross-entropy
- Backpropagation through the stochastic sampling step by expressing samples as a deterministic function of parameters and a noise variable (Correct answer)
Correct answer: Backpropagation through the stochastic sampling step by expressing samples as a deterministic function of parameters and a noise variable
The reparameterization trick writes z = μ + σ·ε (ε ~ N(0,1)), making the sample a differentiable function of μ and σ so gradients can flow through sampling.
Question 24: What are the two main components of a Generative Adversarial Network (GAN)?
- Generator and discriminator trained in opposition to each other (Correct answer)
- Encoder and decoder
- Policy network and value network
- Inference network and sampling network
Correct answer: Generator and discriminator trained in opposition to each other
A GAN consists of a generator that creates fake samples and a discriminator that distinguishes real from fake, with each trained adversarially to improve the other.
Question 25: What is the difference between stochastic gradient descent (SGD) and mini-batch gradient descent?
- SGD uses no learning rate; mini-batch does
- SGD uses all data per update; mini-batch uses one sample
- SGD updates weights using one sample; mini-batch uses a small subset (Correct answer)
- They are identical algorithms
Correct answer: SGD updates weights using one sample; mini-batch uses a small subset
SGD computes the gradient from a single training example per update, while mini-batch gradient descent averages gradients over a small batch of examples.
Question 26: What is the softmax function used for in neural networks?
- Converting raw scores into a probability distribution over classes (Correct answer)
- Clipping gradient values
- Normalizing input features
- Introducing sparsity
Correct answer: Converting raw scores into a probability distribution over classes
Softmax converts a vector of raw logits into probabilities that sum to 1, making it suitable for multi-class classification output layers.
Question 27: What is a 'feature extractor' in the context of transfer learning?
- A technique for compressing model weights
- Using a pre-trained network's intermediate representations as input to a new model without updating the pre-trained weights (Correct answer)
- A preprocessing step that normalizes input data
- A method for selecting the most informative training examples
Correct answer: Using a pre-trained network's intermediate representations as input to a new model without updating the pre-trained weights
When using a pre-trained model as a feature extractor, its weights are frozen and its intermediate activations serve as fixed feature representations fed into a newly trained classifier.
Question 28: What is 'knowledge distillation' in deep learning?
- Removing redundant neurons via pruning
- Extracting symbolic rules from a neural network for interpretability
- Training a smaller student model to mimic the output distribution of a larger teacher model (Correct answer)
- Compressing weights using quantization techniques
Correct answer: Training a smaller student model to mimic the output distribution of a larger teacher model
Knowledge distillation trains a compact student model to match the soft probability outputs (dark knowledge) of a larger, more capable teacher model, transferring learned knowledge without the teacher's computational cost.
Question 29: The human brain is thought to have inspired a neural network model. The neural network is made up of many different components. Each neuron receives an input, processes it, and then outputs. <br> Which of the following statements represents a genuine neuron correctly?
- Although a neuron has only one input, it has several outputs.
- Multiple inputs and outputs are found in a neuron.
- A neuron has only one input and only one output.
- All of the following statements are correct. (Correct answer)
- A neuron has several inputs but only one output.
Correct answer: All of the following statements are correct.
The human brain contains a vast diversity of neuron types, each with unique structures and functions. While a typical neuron receives multiple inputs (dendrites) and its single axon can branch to provide multiple outputs to other neurons, some specialized neurons or simplified models might emphasize different aspects of connectivity. Therefore, depending on the specific neuron type or the level of abstraction, various statements about input/output configurations could be considered correct in a broad context.
Question 30: Weight sharing occurs in which neural net architecture?
- Recurrent Neural Network
- Convolutional neural Network
- Both B and C (Correct answer)
- Fully Connected Neural Network
Correct answer: Both B and C
Weight sharing is a fundamental characteristic of both Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). In CNNs, the same convolutional filters (weights) are applied across different spatial locations of an input, enabling feature detection regardless of position. In RNNs, the same set of weights is reused for each time step in a sequence, allowing the network to learn temporal dependencies and process sequences of varying lengths efficiently.
Deep Learning Fundamentals Assessment
A comprehensive assessment of deep learning concepts including neural network architectures, convolutional and recurrent networks, generative models, and practical data science applications. Based on the deeplearning.ai Deep Learning Specialization curriculum structure.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds