Training Neural Networks
- 72Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
72 questions
- 1During training, a neural network adjusts its parameters to make its predictions closer to the_____for each input.
Hint
This is the target value or label the model is meant to predict.
Answer
ground truth
Explanation
The ground truth provides the desired prediction for an input, and the loss measures the difference between it and the model's prediction.
- 2The numerical values associated with a network's layers that are learned during training are its_____.
Hint
These are the values that training repeatedly adjusts.
Answer
parameters
Explanation
A neural network learns its parameters by changing their values to reduce the loss on available data.
- 3A function that measures the difference between a model's prediction and the ground truth is a_____.
Hint
It gives a measure of prediction error for an example.
Answer
loss
Explanation
The loss is calculated from the difference between the model's prediction and the desired ground truth.
- 4In the lecture's terminology, the overall cost can be calculated as the_____of individual losses across the training data.
Hint
Think of combining each example's loss by adding them together.
Answer
sum
Explanation
The cost function was described as the sum of the losses over the data points in the training set.
- 5The goal of parameter optimization is to find the parameter values that_____the cost function.
Hint
Optimization seeks a lower value of the objective being measured.
Answer
minimize
Explanation
Training searches for parameters that minimize the cost over the available data.
- 6Evaluating the gradient at a point gives first-order information about how the objective changes; this is called_____optimization.
Hint
It uses the local linear approximation rather than curvature information.
Answer
first order
Explanation
First-order optimization relies on the gradient, which gives a local linear approximation to change in the objective.
- 7The matrix of second derivatives used in second-order optimization is the_____.
Hint
It describes curvature through second derivatives.
Answer
Hessian
Explanation
The Hessian contains second-order derivative information, though the lecture notes that it is not often calculated in practice.
- 8In gradient descent, the gradient indicates a direction of steepest increase, so parameters are updated toward the_____direction.
Hint
The update should reduce the loss rather than increase it.
Answer
downward
Explanation
Gradient descent moves downhill on the loss landscape to seek a minimum.
- 9A complete pass of training data used in a parameter update is called an_____.
Hint
This term describes processing the full training set once.
Answer
epoch
Explanation
An epoch is one complete pass through the training data; training typically repeats updates over multiple passes.
- 10A separate set used to monitor whether training progress has plateaued can be a_____set.
Hint
It is used to assess progress during training rather than to fit the parameters directly.
Answer
validation
Explanation
A validation set can help identify when performance stops improving and training may be finished.
- 11Computing a gradient using only a subset of the training examples is the central approximation in_____.
Hint
This method uses sampled data rather than the entire dataset for each gradient calculation.
Answer
stochastic gradient descent
Explanation
Stochastic gradient descent estimates the full-data gradient using a subset of examples.
- 12The subset of examples used to calculate a stochastic gradient is called a_____.
Hint
Its size controls how many examples contribute to an update.
Answer
batch
Explanation
A batch is the subset of data used to compute a gradient for an update.
- 13When a batch contains one example, parameters are updated after each individual_____.
Hint
A batch size of one contains a single data point.
Answer
example
Explanation
With batch size one, each example is processed and followed by a parameter update.
- 14When the batch size equals the full training dataset, stochastic gradient descent becomes standard_____descent.
Hint
This approach uses all examples to calculate each update.
Answer
gradient
Explanation
Using the entire dataset for each gradient calculation is standard gradient descent.
- 15A practical reason to use batches instead of the entire dataset is that full-dataset updates may be too slow or too demanding in_____.
Hint
Consider the time and resources needed to process very large datasets.
Answer
computational complexity
Explanation
Large datasets can make full-gradient calculations computationally intractable or difficult to fit in GPU memory.
- 16Because a batch samples only part of the data, its gradient may differ from the gradient over the full dataset; this creates gradient_____.
Hint
The direction can fluctuate between different batches.
Answer
variance
Explanation
Batch gradients are not guaranteed to match the full-data gradient, so stochastic updates can have high variance.
- 17When categories are unevenly represented, some may be absent from several batches, making gradient updates less_____.
Hint
The issue is that the update direction can shift sharply when a rare category appears.
Answer
stable
Explanation
Imbalanced data can make batch gradients unstable because categories may appear inconsistently across batches.
- 18One benefit of stochastic gradient descent is that noise in its updates can act as an implicit_____.
Hint
This effect can discourage overly narrow solutions and help generalization.
Answer
regularizer
Explanation
The lecture describes the noise in stochastic gradient descent as an implicit regularizer.
- 19The hyperparameter that controls how strongly an update continues in the direction of earlier updates is the_____term.
Hint
It is analogous to a moving object gaining speed as it rolls downhill.
Answer
momentum
Explanation
Momentum biases gradient steps toward the direction of previous updates, with its strength controlled by a hyperparameter.
- 20If momentum is too high, updates can overshoot a minimum and produce_____around it.
Hint
The parameters repeatedly bounce back and forth instead of settling efficiently.
Answer
oscillation
Explanation
Excessive momentum can cause the updates to pass the minimum repeatedly, creating oscillation and slowing optimization.
- 21A loss landscape with a single minimum and gradients that point toward it from everywhere is_____.
Hint
This landscape has no competing local minima.
Answer
convex
Explanation
In the convex case described, there is a single minimum and gradients lead toward it.
- 22When optimization reaches a minimum that is not the lowest value in the entire landscape, it has found a_____minimum.
Hint
This minimum is best only within a nearby region.
Answer
local
Explanation
A non-convex landscape may have multiple minima, so gradient descent can settle at a local rather than global minimum.
- 23On a landscape with multiple local minima, the final solution can depend strongly on where the parameters are_____.
Hint
Different starting points can lead optimization into different basins.
Answer
initialized
Explanation
Initialization matters when a non-convex loss landscape has multiple local minima.
- 24A gradient that becomes extremely small across a region creates a_____gradient problem.
Hint
With little gradient signal, progress can become very slow.
Answer
vanishing
Explanation
Vanishing gradients provide little signal for optimization, so progress can be slow and batch noise may dominate.
- 25If the gradient is zero everywhere on a flat landscape, it provides no useful_____about how to reduce the loss.
Hint
The optimizer has no directional information from the gradient.
Answer
signal
Explanation
A zero gradient across a flat landscape is uninformative about how to make progress toward a low-loss region.
- 26When gradients grow extremely large near a minimum, the resulting problem is called an_____gradient.
Hint
Updates may become unstable and jump too far.
Answer
exploding
Explanation
Exploding gradients can cause very large, unstable updates that overshoot the minimum.
- 27A function can be differentiable in PyTorch yet still be difficult to optimize if its gradient is_____.
Hint
Autograd can calculate a derivative that supplies no useful direction.
Answer
zero
Explanation
PyTorch autograd can calculate gradients for many functions, but a zero gradient does not give the optimizer a useful path toward a minimum.
- 28At a discontinuity, PyTorch autograd can still define gradients using assumptions such as_____derivatives.
Hint
These derivatives describe change along a specified direction.
Answer
directional
Explanation
The lecture notes that PyTorch can calculate derivatives around discontinuities using directional derivatives, even when optimization may remain difficult.
- 29A way to assess how sensitive results are to initialization is to compare performance across different random_____.
Hint
Each one can produce a different starting point for training.
Answer
seeds
Explanation
Variation in performance across random seeds can indicate instability in the loss landscape.
- 30Evolution strategies search locally by sampling small_____around current parameter values.
Hint
These are small changes used to explore nearby parameter settings.
Answer
perturbations
Explanation
Evolution strategies sample perturbations around current parameters and move toward those that achieve lower loss.
- 31In an evolution strategy, the sampled parameter changes are evaluated by comparing their resulting_____.
Hint
The method prefers perturbations that improve the objective.
Answer
loss
Explanation
Evolution strategies select perturbations that result in lower loss, providing locally loss-minimizing directions.
- 32Gradient clipping limits the size of an update when the gradient exceeds a chosen_____.
Hint
The gradient is scaled back rather than allowed to grow without bound.
Answer
value
Explanation
Gradient clipping scales gradients that exceed a specified maximum, helping prevent excessively large updates.
- 33Gradient clipping can help prevent updates from moving too far and_____across a sharp region of the loss landscape.
Hint
The parameters might otherwise jump back and forth over a minimum.
Answer
oscillating
Explanation
By limiting update size, gradient clipping can reduce overshooting and oscillation in sharp loss landscapes.
- 34A commonly used activation function that is continuous everywhere and differentiable almost everywhere, but not smooth everywhere, is_____.
Hint
Its graph has a kink where its behavior changes.
Answer
ReLU
Explanation
ReLU is continuous everywhere and almost everywhere differentiable, but its kink means it is not everywhere smooth.
- 35The activation function formed using the Gaussian cumulative distribution function and discussed as a smooth alternative is_____.
Hint
Its name expands to Gaussian error linear unit.
Answer
GeLU
Explanation
GeLU uses the Gaussian cumulative distribution function and is everywhere continuous, differentiable, and smooth.
- 36The three loss-landscape properties that the lecture says trends increasingly favor are continuity, differentiability, and_____.
Hint
This property rules out abrupt changes in the derivative.
Answer
smoothness
Explanation
The properties discussed are being everywhere continuous, everywhere differentiable, and everywhere smooth.
- 37A computational graph represents functional transformations as nodes connected by_____.
Hint
They show how information moves between operations.
Answer
edges
Explanation
Each node represents a functional transformation, while edges carry information between transformations.
- 38A deep-learning computation graph is commonly a directed acyclic graph, abbreviated_____.
Hint
The abbreviation names a graph that is directed and has no cycles.
Answer
DAG
Explanation
Deep learning primarily uses directed acyclic graphs, or DAGs.
- 39In a directed graph, information on an edge is assumed to travel in_____direction.
Hint
The edges are not treated as carrying information both ways.
Answer
one
Explanation
Directed means that information flows in only one direction along a given edge.
- 40Acyclic means that a graph contains no loops or_____.
Hint
The term rules out paths that return to an earlier node.
Answer
cycles
Explanation
An acyclic graph has no cycles or loops.
- 41A layer or neural network can serve as a_____in a computation graph.
Hint
It is one functional transformation within the larger graph.
Answer
node
Explanation
A computation graph can represent layers or whole networks as functional transformation nodes.
- 42In a forward pass, a component maps its inputs and parameters to its_____.
Hint
These values are passed onward to later components.
Answer
outputs
Explanation
A forward pass applies a functional transformation to inputs and parameters to produce outputs.
- 43Because each layer is differentiable with respect to its inputs, gradients can be propagated through the_____.
Hint
This is the full sequence or graph of connected components.
Answer
network
Explanation
Differentiable layers make it possible to compute gradients with respect to parameters throughout the network.
- 44For a vector-valued output, the matrix of partial derivatives of output components with respect to input components is the_____.
Hint
It organizes many first derivatives into a matrix.
Answer
Jacobian
Explanation
The Jacobian contains the partial derivatives of each output component with respect to each input component.
- 45The chain rule computes a derivative through a composition by multiplying the relevant_____derivatives.
Hint
Each local derivative describes one step in the composed function.
Answer
partial
Explanation
The chain rule factors the derivative of a composition into products of derivatives for its component transformations.
- 46Backpropagation reuses shared derivative terms so they do not need to be computed separately for every_____.
Hint
The efficiency benefit applies to the many model values being learned.
Answer
parameter
Explanation
Backpropagation efficiently propagates shared terms through the computation graph instead of separately recomputing every derivative.
- 47During the backward pass, gradients carry an error_____from the outputs and loss toward earlier layers.
Hint
It communicates how the cost changes as information moves backward.
Answer
signal
Explanation
The backward pass propagates the gradient or error signal from the output and loss back toward inputs and parameters.
- 48For a layer, the gradient of its outputs with respect to its inputs describes how the layer's outputs change with its_____.
Hint
It is a local derivative of the layer transformation.
Answer
inputs
Explanation
The layer derivative with respect to its inputs captures how the outputs respond to changes in those inputs.
- 49The gradient of the cost with respect to a layer's activations indicates how the cost changes with those_____.
Hint
This is the quantity propagated backward through the layer.
Answer
activations
Explanation
The activation gradient records the cost's partial derivatives with respect to the layer activations.
- 50A layer's input gradient is computed by multiplying its output gradient by the layer's local_____.
Hint
The chain rule combines the incoming gradient with this local quantity.
Answer
derivative
Explanation
Backpropagation computes the input gradient iteratively by combining the output gradient with the layer derivative.
- 51The standard neural-network training cycle is forward pass, backward pass, parameter update, and_____.
Hint
The cycle continues until training meets a stopping criterion.
Answer
repeat
Explanation
Training repeatedly computes outputs and loss, propagates gradients backward, updates parameters, and runs the process again.
- 52For a batch, the gradient of the average cost is the average of the gradients of the per-data-point_____.
Hint
Each example contributes its own objective value and gradient.
Answer
costs
Explanation
The derivative can move inside the sum, so the batch gradient is obtained by averaging individual per-example cost gradients.
- 53Backpropagation requires storing intermediate layer representations so they can be used during the_____pass.
Hint
The saved values are needed after the forward computation has completed.
Answer
backward
Explanation
Intermediate representations or activations must be kept in memory to efficiently calculate backpropagation.
- 54In a linear layer, the forward output is calculated by multiplying the weight matrix by the_____.
Hint
This vector is transformed by the layer's weights.
Answer
input
Explanation
For a linear layer, the output is the weights multiplied by the input.
- 55For a linear layer, the backward input gradient is calculated by multiplying the output gradient by the_____.
Hint
The same layer matrix used in the forward operation is involved.
Answer
weights
Explanation
The input gradient is obtained by multiplying the output gradient by the layer weights, with the appropriate matrix orientation.
- 56In a linear layer, the weight update direction is formed from the layer input and the_____gradient.
Hint
This is the gradient arriving from the next part of the network.
Answer
output
Explanation
The weight update direction is calculated by multiplying the input by the output gradient.
- 57The learning rate scales the parameter update direction before that change is applied to the_____.
Hint
These are the learned values changed by the update.
Answer
weights
Explanation
The update direction is multiplied by the learning rate and applied to the weights.
- 58A multilayer perceptron can be represented as connected linear layers and an_____function.
Hint
ReLU is one example of this kind of function.
Answer
activation
Explanation
An MLP combines linear transformations with activation functions, followed by an output and loss calculation.
- 59On the backward pass through a ReLU, a gating operation masks gradients for components that were in the_____part of the ReLU.
Hint
Those components were inactive during the forward pass.
Answer
zero
Explanation
The backward operation gates gradients so that components corresponding to the zero part of ReLU do not pass gradients onward.
- 60In the transposed-vector convention described for an MLP, the backward operation for a linear layer uses the weights_____.
Hint
The matrix orientation is reversed compared with the forward operation.
Answer
transposed
Explanation
With gradients treated as column vectors, the backward operation for a linear layer is the forward operation using transposed weights.
- 61A first-order approximation of a complex loss landscape is a_____.
Hint
It is the linear surface used to approximate local behavior.
Answer
plane
Explanation
The lecture explains that first-order gradient optimization fits a plane to the local loss landscape and moves along its direction.
- 62To backpropagate through a merge, each path must receive the gradient corresponding to its own_____variables.
Hint
The merge combines information from multiple sources, which must remain distinguishable in the backward pass.
Answer
input
Explanation
At a merge, gradients are propagated with respect to the correct input variables on each contributing path.
- 63When information branches into multiple paths, the gradients from those paths are_____before being sent back through the shared input.
Hint
The contributions from every branch are aggregated.
Answer
summed
Explanation
Backpropagation through a branching operation adds the gradients from the different paths.
- 64When parameters are shared across several components, their gradient contributions are handled like a_____in the graph.
Hint
The shared parameters affect multiple downstream paths.
Answer
branch
Explanation
Parameter sharing can be viewed as branching, so gradients from the paths using those parameters are summed.
- 65Differential programming treats a model as a program whose components can be differentiated and optimized with respect to a scalar_____.
Hint
This is the objective used to evaluate how well the system performs.
Answer
cost
Explanation
Differential programming enables optimization of nodes or edges with respect to a scalar cost.
- 66PyTorch, TensorFlow, and JAX are libraries that enable efficient_____programming.
Hint
The programming approach combines model computation with differentiation.
Answer
differential
Explanation
These libraries support differential programming by providing tools for constructing computations and calculating gradients.
- 67A model component that is fixed by a human rather than learned from training data is_____.
Hint
It is explicitly specified instead of being adjusted through backpropagation.
Answer
programmed
Explanation
Differential programs may combine components explicitly programmed by a human with components learned through backpropagation.
- 68Normalizing natural images with chosen values during preprocessing is an example of an explicitly programmed component that is not necessarily_____.
Hint
The values can be set directly rather than estimated by training.
Answer
learned
Explanation
The lecture uses image normalization as an example of a preprocessing choice defined directly rather than learned.
- 69A neural-network encoder maps complex, high-dimensional input into a lower-dimensional_____.
Hint
This compact representation may be a vector.
Answer
embedding
Explanation
An encoder produces a low-dimensional representation, often called an embedding, of its input data.
- 70To optimize model inputs rather than model parameters, training can update the input while keeping the model parameters_____.
Hint
The model is held constant as the input is adjusted.
Answer
fixed
Explanation
Input optimization changes the input to increase or decrease a model output while the parameters remain fixed.
- 71Feature visualization can probe a trained model by optimizing an input to maximize the activation of a particular_____.
Hint
The target can be specified by its location in a layer.
Answer
neuron
Explanation
Optimizing an input to maximize a neuron's value reveals patterns that the model associates with that neuron.
- 72In the CLIP and image-generation example, the optimized hidden value is the_____to the image generator.
Hint
The pretrained model parameters remain fixed while this value is adjusted.
Answer
input
Explanation
The image generator and CLIP encoders can be fixed while optimizing the input that produces an image most aligned with a text prompt.

Ask anything
We've read this whole study set, so questions about it get the best answers.