Deep Learning with PyTorch
- 129Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
129 questions
- 1Deep learning is a subset of_____that uses layered models to learn patterns.
Hint
Think of the broader field that includes many types of predictive models.
Answer
machine learning
- 2A basic neural network is organized into input, hidden, and_____layers.
Hint
This layer contains the model's predictions.
Answer
output
- 3The original brain-inspired intuition for neural networks was based on interconnected cells called_____.
Hint
These cells are the basic units of the nervous system.
Answer
neurons
- 4Because layered models need substantial data to derive patterns, deep learning tasks often involve at least_____data points.
Hint
The content describes a data requirement much larger than a few thousand examples.
Answer
hundreds of thousands
- 5The popular framework used throughout the course to implement deep learning algorithms is_____.
Hint
It is a well-maintained framework with a Python-friendly interface.
Answer
PyTorch
- 6The fundamental data structure in PyTorch, similar to an array or matrix, is a_____.
Hint
Neural network computations in PyTorch are built around this multidimensional structure.
Answer
tensor
- 7PyTorch tensors can be created from Python lists or_____.
Hint
These are array objects from a widely used Python numerical library.
Answer
NumPy arrays
- 8In PyTorch, a tensor's dimensions can be inspected using its_____attribute.
Hint
This property reveals the size along each dimension.
Answer
shape
- 9A tensor's_____identifies the kind of values it stores, such as 64-bit integers.
Hint
This property distinguishes integer values from floating-point values.
Answer
data type
- 10Two tensors can be added or subtracted element by element when their_____match exactly.
Hint
Their dimensions must align.
Answer
shapes
- 11In matrix multiplication, each result is calculated by multiplying a row of the first matrix by a_____of the second matrix and summing the products.
Hint
The row is paired with a vertical set of values from the second matrix.
Answer
column
- 12A neural network's input neurons correspond to the dataset's_____, while its output neurons correspond to the classes or values being predicted.
Hint
These are the input variables describing each example.
Answer
features
- 13A network in which every input neuron connects to every output neuron is called a_____network.
Hint
Every neuron in one layer links to all neurons in the adjacent layer.
Answer
fully connected
- 14A network with no hidden layers and a single linear output layer is equivalent to a_____model.
Hint
It represents a direct linear relationship between inputs and outputs.
Answer
linear
- 15The PyTorch module commonly imported as_____
nnprovides concise and flexible components for building.Hint
It includes layers and containers used to define models.
Answer
neural networks
- 16The learned quantities that determine how strongly input features affect a linear neuron are its_____.
Hint
A feature with greater influence has a larger value of this learned quantity.
Answer
weights
- 17A neuron's additional term, independent of its feature weights, that provides a baseline output is the_____.
Hint
It shifts the neuron's output independently of the weighted inputs.
Answer
bias
- 18PyTorch's_____
nn.Sequentialcontainer passes input through its layers.Hint
Each layer's output becomes the next layer's input.
Answer
in sequence
- 19For adjacent linear layers to connect properly, the input dimension of each layer must match the_____dimension of the preceding layer.
Hint
The number of values produced by one layer must be accepted by the next.
Answer
output
- 20Each neuron with eight input weights and one bias has_____learnable parameters.
Hint
Count the weights and add the bias.
Answer
nine
- 21A two-layer model with 36 parameters in its first layer and 10 in its second has_____learnable parameters in total.
Hint
Add the parameter counts of both layers.
Answer
46
- 22A model's ability to handle more complex datasets, which tends to increase as it gains parameters, is its model_____.
Hint
This describes how much complexity a model can represent.
Answer
capacity
- 23Adding non-linear activation functions allows a network to learn interactions beyond simple_____relationships.
Hint
These are the relationships a network made only of linear layers is limited to modeling.
Answer
linear
- 24For binary classification, the sigmoid function transforms an output into a value between_____and 1.
Hint
The output is bounded by the endpoints of the probability range.
Answer
0
- 25With a 0.5 threshold, a sigmoid probability greater than 0.5 is assigned to_____.
Hint
This is the positive class in the binary example.
Answer
class one
- 26For multiclass classification, softmax produces probabilities that sum to_____.
Hint
The outputs form a probability distribution.
Answer
one
- 27In a multiclass prediction, the selected class is the one with the_____probability.
Hint
Choose the class with the largest output score after probabilities are calculated.
Answer
highest
- 28The process of passing input data forward through network layers to produce predictions is called a_____pass.
Hint
It moves data from the input toward the output.
Answer
forward
- 29A regression network predicting continuous values can use a final linear layer with_____activation function.
Hint
Unlike classification, the output need not be restricted to a probability range.
Answer
no
- 30A loss function compares a model prediction with the_____label to measure prediction error.
Hint
This is the known target against which the prediction is evaluated.
Answer
true
- 31The training objective is to_____the loss value.
Hint
The model should make its predictions closer to the ground truth.
Answer
minimize
- 32For classification, the commonly used loss function that takes raw class scores and encoded targets is_____loss.
Hint
It is the standard classification loss highlighted in the content.
Answer
cross entropy
- 33In one-hot encoding, the true class is represented by a 1 while all other class positions contain_____.
Hint
All non-target entries are set to this value.
Answer
zeros
- 34For three classes, the one-hot encoding of class zero is_____.
Hint
Place the 1 in the first of three positions.
Answer
100
- 35The slope of a loss function with respect to a parameter is represented by its_____.
Hint
It indicates how steeply the function rises or falls.
Answer
derivative
- 36During backpropagation, derivatives of the loss with respect to model parameters are called_____.
Hint
These values guide parameter updates.
Answer
gradients
- 37A point where the slope of the loss function is flat and its derivative is zero is a_____.
Hint
It is a low point in the function that training aims to reach.
Answer
minimum
- 38A non-convex loss function can have multiple_____minima, each lower than nearby points but not necessarily the lowest overall.
Hint
These minima are confined to a neighborhood rather than being globally lowest.
Answer
local
- 39The backward pass that calculates gradients and propagates them through a network is called_____.
Hint
It is the process that follows the forward pass to compute parameter gradients.
Answer
backpropagation
- 40In PyTorch, calling_____
backwardon the loss stores parameter gradients in each parameter'sattribute.Hint
This attribute holds the calculated gradient.
Answer
grad
- 41The optimizer updates model parameters by taking steps guided by their loss gradients, a method known as gradient_____.
Hint
The method moves parameters in a direction intended to reduce the loss.
Answer
descent
- 42The tunable value that controls the size of parameter updates is the_____rate.
Hint
It determines how large a step the optimizer takes.
Answer
learning
- 43Stochastic gradient descent is commonly abbreviated_____.
Hint
The abbreviation combines the initial letters of the optimizer's name.
Answer
SGD
- 44The optimizer's_____
stepoperation applies calculated gradients tomodel parameters.Hint
It changes parameter values based on the optimizer's rule.
Answer
update
- 45A learning rate that is too high can cause an optimizer to_____around the minimum instead of settling near it.
Hint
The steps overshoot on alternating sides of the low point.
Answer
bounce
- 46Momentum helps an optimizer move past local minima by maintaining larger steps when recent steps were also_____.
Hint
It carries forward the effect of previous update sizes.
Answer
large
- 47In a training loop, gradients are typically set to zero before processing a new batch because the optimizer otherwise retains gradients from_____steps.
Hint
These are gradients from earlier batches.
Answer
previous
- 48For regression, mean squared error is the mean of the_____differences between predictions and ground truth.
Hint
The error is multiplied by itself before averaging.
Answer
squared
- 49A dataset that is fully passed through once during training completes one_____.
Hint
Training commonly repeats this full-data cycle multiple times.
Answer
epoch
- 50The number of samples processed together in one data-loader iteration is the_____size.
Hint
It controls how many examples are grouped for each iteration.
Answer
batch
- 51Randomizing sample order during training with the data loader's_____
shuffleoption can improve model.Hint
This is the ability to perform well on unseen data.
Answer
generalization
- 52Training data adjusts model parameters, validation data helps tune hyperparameters, and test data evaluates the model's_____performance.
Hint
This evaluation is made after model development and tuning.
Answer
final
- 53For a regression target that is continuous, a suitable loss function is_____loss.
Hint
It averages the squared differences between predictions and targets.
Answer
mean squared error
- 54Training loss is averaged across batches by dividing the accumulated loss by the number of_____.
Hint
This count is the denominator when computing mean loss for an epoch.
Answer
batches
- 55When training loss keeps decreasing while validation loss starts rising, the model is likely_____.
Hint
The model is learning the training examples too specifically.
Answer
overfitting
- 56For multiclass accuracy,_____
argmaxselects the class with theoutput probability.Hint
The selected class has the largest predicted score.
Answer
highest
- 57Dropout combats overfitting by randomly_____a fraction of neurons during training.
Hint
Some neurons are temporarily prevented from contributing.
Answer
deactivating
- 58The dropout parameter_____
pspecifies the probability that a neuron is set to.Hint
Dropped neurons contribute no activation.
Answer
zero
- 59Weight decay regularizes a model by encouraging its weights to remain_____.
Hint
The penalty discourages excessive growth of parameter values.
Answer
small
- 60Creating altered versions of existing examples, such as rotated or scaled images, is called data_____.
Hint
This technique artificially expands a dataset.
Answer
augmentation
- 61A useful first check before training on an entire dataset is to see whether the model can overfit a_____data point.
Hint
Begin with just one example to check that the problem and implementation are workable.
Answer
single
- 62Grid search tests hyperparameter values at predetermined intervals, while random search samples values_____within a specified range.
Hint
Unlike grid search, this method does not test only a fixed set of points.
Answer
randomly
- 63A digital image is made up of small units called_____.
Hint
Each is a tiny square representing one point in the image.
Answer
pixels
- 64In a grayscale image, pixel values can represent shades from black to white using integers from 0 to_____.
Hint
This is the upper endpoint of the described 8-bit intensity range.
Answer
255
- 65A typical color image pixel is represented by red, green, and_____intensity values.
Hint
This is the third channel in the standard RGB representation.
Answer
blue
- 66PyTorch Vision's_____
ImageFoldercan organize image data by treating each categoryas a class.Hint
Images are stored inside separate folders corresponding to categories.
Answer
directory
- 67Resizing every loaded image to the same height and width ensures images have consistent_____.
Hint
Models need image dimensions that can be handled consistently in batches.
Answer
size
- 68In a color image tensor shaped as batch, channels, height, and width, the channel dimension contains_____color channels.
Hint
The channels correspond to the standard color components.
Answer
three
- 69Image augmentation should be chosen with the data and task in mind because some transformations can change or confuse the example's_____.
Hint
A transformed image must still represent the same target category.
Answer
label
- 70A convolutional layer uses small grids called_____that slide over the input.
Hint
These learn local patterns and are applied at multiple positions.
Answer
filters
- 71The output of applying a convolutional filter across an input is a_____map.
Hint
It records the pattern responses at different input locations.
Answer
feature
- 72A convolution operation combines an input patch and a filter by multiplying corresponding elements and summing the results, which is their_____product.
Hint
This operation multiplies corresponding values and then adds them.
Answer
dot
- 73Adding zeros around an image before convolution to help preserve spatial dimensions is called zero_____.
Hint
This technique adds a border around the input.
Answer
padding
- 74A max-pooling window forwards the_____value found inside each window.
Hint
The operation keeps the largest activation in its region.
Answer
maximum
- 75A max-pooling window of size two by two halves a feature map's height and_____.
Hint
The other spatial dimension is reduced along with height.
Answer
width
- 76A convolutional network's feature extractor output is often converted into a vector using a_____operation before the classifier.
Hint
This turns multiple feature-map dimensions into one vector.
Answer
flatten
- 77Compared with large fully connected layers, convolutional layers reduce parameter counts by sharing small filters and preserve information about_____patterns.
Hint
These patterns concern the arrangement and location of image features.
Answer
spatial
- 78Precision measures the fraction of predicted positive examples that are correct, while recall measures the fraction of actual positive examples correctly_____.
Hint
Recall asks how many of the real positive cases the model successfully identifies.
Answer
predicted
- 79Macro averaging calculates a metric for each class independently and then gives every class_____influence in the final mean.
Hint
Class size does not affect each class's contribution under this average.
Answer
equal
- 80Weighted averaging gives each class's score influence proportional to its number of_____.
Hint
Larger classes receive greater weight in this average.
Answer
samples
- 81Micro averaging combines true positives, false positives, and false negatives across all classes before calculating the metric_____.
Hint
Rather than averaging class-specific scores, it pools counts across classes.
Answer
globally
- 82When performance on smaller classes matters equally, even if the dataset is imbalanced,_____averaging can be appropriate.
Hint
This averaging method treats each class equally.
Answer
macro
- 83Sequential data is data in which the order of data points matters and may contain temporal or spatial_____.
Hint
Earlier or neighboring values can be related to later values.
Answer
dependencies
- 84Randomly splitting time series data can cause lookahead bias because the model may indirectly access information from the_____.
Hint
Forecasting should be tested on data that occurs after the training period.
Answer
future
- 85For electricity readings collected every 15 minutes, a 24-hour input sequence contains_____data points.
Hint
There are four 15-minute intervals in each hour.
Answer
96
- 86In next-step forecasting, the target is the data point immediately_____the input sequence.
Hint
The model predicts the next value following the observed window.
Answer
after
- 87Unlike a feedforward network, a recurrent neural network passes a hidden state from one time step to the_____.
Hint
This feedback connection carries information through the sequence.
Answer
next
- 88At the first time step of a recurrent sequence, when no previous hidden state exists, it is typically initialized to_____.
Hint
The initial state is set to a neutral value.
Answer
zero
- 89A recurrent network that receives a sequence and uses the output at every time step is a sequence-to-_____architecture.
Hint
It produces a sequence of outputs rather than only one final output.
Answer
sequence
- 90A recurrent network that reads an entire input sequence and uses only its final output is a sequence-to-_____architecture.
Hint
It condenses the processed sequence into one output, such as a text category.
Answer
vector
- 91A model that takes a single input and generates outputs at multiple time steps follows a vector-to-_____architecture.
Hint
It can generate a series of words from one input representation.
Answer
sequence
- 92In an encoder-decoder architecture, the input sequence is processed before the model begins generating the output_____.
Hint
This separates input processing from the generated response.
Answer
sequence
- 93An LSTM's additional state for retaining long-term information is commonly denoted by_____.
Hint
The other LSTM state, often denoted by H, represents short-term memory.
Answer
C
- 94Within an LSTM, the_____gate removes selected information from long-term memory.
Hint
Its role is to discard information that is no longer needed.
Answer
forget
- 95Within an LSTM, the_____gate selects important information to store in long-term memory.
Hint
It controls which new information enters the cell state.
Answer
input
- 96Compared with an LSTM, a GRU merges long-term and short-term memory into a single_____state.
Hint
It does not maintain the separate cell state used by an LSTM.
Answer
hidden
- 97Because a GRU is less complex than an LSTM, it generally requires less_____.
Hint
Its simpler structure can reduce the resources needed to process data.
Answer
computation
- 98For a recurrent layer, the common input layout is batch size, sequence length, and number of_____.
Hint
This final dimension counts the values available at each time step.
Answer
features
- 99When model outputs have an extra size-one dimension that labels lack, the_____
squeezeoperation removes that dimension so theirmatch.Hint
Loss functions require predictions and targets to have the same dimensions.
Answer
shapes
- 100In object-oriented programming, an object combines data called attributes with abilities called_____.
Hint
These are functions associated with an object.
Answer
methods
- 101The class method called when a new object is created is the_____method.
Hint
It is the constructor-like method used to initialize an object's attributes.
Answer
init
- 102In a Python class method, the conventional first argument referring to the current object is_____.
Hint
It allows the method to access that object's attributes and methods.
Answer
self
- 103A custom PyTorch dataset implements a method that returns the total number of samples, called_____.
Hint
This method reports the dataset's length.
Answer
len
- 104A custom PyTorch dataset implements the method that retrieves a sample by index, called_____.
Hint
This method lets indexing return one example and its label.
Answer
get item
- 105In a class-based PyTorch model, the method that defines how inputs pass through the layers is_____.
Hint
It specifies the model's computation from input to output.
Answer
forward
- 106Adaptive gradient, or Adagrad, is particularly suited to sparse data because it reduces the learning rate for parameters that are_____updated.
Hint
Some features appear only rarely in the data.
Answer
infrequently
- 107RMSprop adapts the learning rate for each parameter based on the size of its previous_____.
Hint
These values indicate the recent direction and magnitude of the loss change.
Answer
gradients
- 108Adam combines RMSprop with the concept of_____from past gradients.
Hint
It uses a weighted average that gives more influence to recent gradients.
Answer
momentum
- 109To reduce unstable gradients, initialization should keep the variance of a layer's inputs close to the variance of its_____.
Hint
The distributions on both sides of the layer should have similar variance.
Answer
outputs
- 110He initialization is a weight initialization method suited to_____and similar activation functions.
Hint
Its name is also associated with Kaiming initialization.
Answer
ReLU
- 111Standard ReLU can cause the dying neuron problem because its output is zero for any_____input.
Hint
The activation suppresses values below zero.
Answer
negative
- 112ELU can help avoid the dying neuron problem because its gradients remain non-zero for_____values.
Hint
Unlike standard ReLU, it does not simply output zero throughout this region.
Answer
negative
- 113Batch normalization first normalizes layer outputs by subtracting the mean and dividing by the_____deviation.
Hint
This statistical measure describes spread around the mean.
Answer
standard
- 114After normalization, batch normalization learns scale and_____parameters for the layer outputs.
Hint
Together, these parameters adjust the normalized distribution.
Answer
shift
- 115Batch normalization's input size should equal the preceding layer's_____size.
Hint
It must match the number of values produced by the layer before it.
Answer
output
- 116A model trained on one task and reused as a starting point for another task is an example of_____learning.
Hint
The learned weights are carried from a first task to a second.
Answer
transfer
- 117When reusing a pretrained model for a similar task, training it with a smaller learning rate is called_____.
Hint
This is a specific form of transfer learning.
Answer
fine tuning
- 118A common transfer-learning guideline is to freeze early layers and fine tune layers closer to the_____layer.
Hint
These later layers are nearer to the model's predictions.
Answer
output
- 119A multi-input model can compare two representations to learn whether they refer to the same_____.
Hint
This is the goal in examples such as comparing a passport photo with a live image.
Answer
object
- 120In the Omniglot multi-input example, the character image is paired with a one-hot vector representing its_____.
Hint
The vector identifies which writing system the character comes from.
Answer
alphabet
- 121After processing the image and alphabet inputs separately, the example multi-input model joins their representations using tensor_____.
Hint
This operation combines tensors along a specified dimension.
Answer
concatenation
- 122In the multi-output Omniglot example, the model predicts both the character and the_____it belongs to.
Hint
This is the second classification target besides character identity.
Answer
alphabet
- 123For a multi-label classification problem, one input may belong to_____classes simultaneously.
Hint
An image might, for example, depict both a beach and people.
Answer
multiple
- 124When a model has multiple outputs, it can combine the partial losses by summing them if each task is considered_____important.
Hint
Neither task receives extra emphasis in this case.
Answer
equally
- 125If character classification is twice as important as alphabet classification, the character loss can be multiplied by_____.
Hint
The loss weight should reflect the stated relative importance.
Answer
two
- 126When combining losses of very different magnitudes, the larger loss may dominate and cause the model to ignore the_____loss.
Hint
The issue is that one objective can overwhelm the other numerically.
Answer
smaller
- 127Scaling each loss by dividing it by the maximum value in its batch can bring the losses into a more comparable_____.
Hint
The scaling is intended to put the losses on a similar numerical scale.
Answer
range
- 128A multi-output model requires a separate accuracy metric for each output task during_____.
Hint
Each prediction target has its own performance score.
Answer
evaluation
- 129In the Omniglot example, alphabet prediction is easier than character prediction partly because it has 30 classes instead of_____.
Hint
This is the number of possible character labels.
Answer
964

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