Convolutional Neural Networks
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is machine learning?
What is machine learning?
20 questions
- 1
What is machine learning?
- A
A method for computers to perform arithmetic operations faster than humans
- B
A subdomain of computer science that focuses on algorithms that learn from data without explicit programming
- C
The study of how computers can mimic human emotions
- D
A branch of mathematics dealing with probability distributions
Correct answer
BA subdomain of computer science that focuses on algorithms that learn from data without explicit programming
Explanation
Machine learning is a subdomain of computer science that focuses on algorithms that help a computer learn from data without being explicitly programmed for every instruction.
- A
- 2
In supervised learning, what is used to train models?
- A
Unlabeled data to discover patterns
- B
Labeled inputs with corresponding output labels
- C
Rewards and penalties from an environment
- D
Only input features without any targets
Correct answer
BLabeled inputs with corresponding output labels
Explanation
Supervised learning uses labeled inputs, where each input has a corresponding output label, to train the model.
- A
- 3
Which type of machine learning involves an agent learning from rewards and penalties in an interactive environment?
- A
Transfer learning
- B
Unsupervised learning
- C
Supervised learning
- D
Reinforcement learning
Correct answer
DReinforcement learning
Explanation
Reinforcement learning involves an agent learning based on rewards or penalties while interacting with an environment.
- A
- 4
What distinguishes nominal data from ordinal data?
- A
Nominal data is discrete, while ordinal data is continuous
- B
Nominal data is quantitative, while ordinal data is qualitative
- C
Nominal data has numerical values, while ordinal data has categorical values
- D
Nominal data has no inherent order, while ordinal data has a natural ranking
Correct answer
DNominal data has no inherent order, while ordinal data has a natural ranking
Explanation
Nominal data is categorical without order (e.g., country), whereas ordinal data has a natural order (e.g., happiness rating).
- A
- 5
In the context of machine learning, what is a feature vector?
- A
The weights of a neural network layer
- B
The output label of a sample
- C
A vector of numerical values representing the input sample
- D
A matrix containing all the training samples
Correct answer
CA vector of numerical values representing the input sample
Explanation
A feature vector is the input to the model, typically a vector of numbers representing the attributes of a sample.
- A
- 6
What is the primary difference between classification and regression tasks?
- A
Classification predicts discrete classes, while regression predicts continuous values
- B
Classification uses labeled data, while regression uses unlabeled data
- C
Classification is supervised, while regression is unsupervised
- D
Classification outputs probabilities, while regression outputs integers
Correct answer
AClassification predicts discrete classes, while regression predicts continuous values
Explanation
Classification predicts discrete categories (e.g., hot dog or not), while regression predicts continuous numerical values (e.g., price).
- A
- 7
What is the purpose of a validation set in machine learning?
- A
To select the best model among multiple candidates
- B
To augment the training data by creating variations
- C
To train the model on additional data
- D
To provide a final accuracy assessment after model selection
Correct answer
ATo select the best model among multiple candidates
Explanation
The validation set is used to compare different models and choose the best one, acting as a test drive before final evaluation.
- A
- 8
Which loss function is typically used for binary classification?
- A
L1 loss
- B
Binary cross-entropy loss
- C
Hinge loss
- D
Mean squared error loss
Correct answer
BBinary cross-entropy loss
Explanation
Binary cross-entropy loss is used for binary classification problems, as mentioned in the course for the hot dog classifier.
- A
- 9
How does L2 loss differ from L1 loss in terms of penalizing errors?
- A
L2 loss penalizes larger errors more heavily due to its quadratic nature
- B
L1 loss penalizes larger errors more heavily due to its quadratic nature
- C
L2 loss is linear, while L1 loss is quadratic
- D
L1 loss is used for classification, while L2 loss is for regression
Correct answer
AL2 loss penalizes larger errors more heavily due to its quadratic nature
Explanation
L2 loss is quadratic (error squared), so larger errors are penalized more than in L1 loss, which is linear.
- A
- 10
In a neural network, what is the role of an activation function?
- A
To compute the loss between prediction and target
- B
To introduce non-linearity so the network can learn complex patterns
- C
To reduce the number of parameters in the network
- D
To normalize the inputs to have zero mean
Correct answer
BTo introduce non-linearity so the network can learn complex patterns
Explanation
Activation functions add non-linearity; without them, the entire network collapses into a linear model.
- A
- 11
Which activation function is described as a rectified linear unit and is commonly used in hidden layers?
- A
Sigmoid
- B
Softmax
- C
Tanh
- D
ReLU
Correct answer
DReLU
Explanation
ReLU (Rectified Linear Unit) is a classic activation function that is often used and was recommended in the course.
- A
- 12
What does gradient descent do during training?
- A
Augments the training data by creating new samples
- B
Randomly initializes all weights
- C
Adjusts the weights in the direction that minimizes the loss function
- D
Calculates the accuracy on the validation set
Correct answer
CAdjusts the weights in the direction that minimizes the loss function
Explanation
Gradient descent follows the slope (gradient) of the loss function to update weights and reduce the loss.
- A
- 13
What is the purpose of a convolution operation in a CNN?
- A
To normalize pixel values between 0 and 1
- B
To reduce the dimensions of the image by taking averages
- C
To flatten the image into a vector for classification
- D
To extract features from an image by applying a filter
Correct answer
DTo extract features from an image by applying a filter
Explanation
Convolution applies a filter (kernel) over the image to extract important features like edges.
- A
- 14
What does max pooling do in a CNN?
- A
Reduces the spatial dimensions by taking the maximum value in each window
- B
Applies a nonlinear activation function to each pixel
- C
Flattens the feature maps into a vector
- D
Increases the resolution by interpolating between pixels
Correct answer
AReduces the spatial dimensions by taking the maximum value in each window
Explanation
Max pooling takes the largest value from a small window (e.g., 2x2) to downsample the feature map.
- A
- 15
Why is data augmentation used in training CNNs?
- A
To increase the variety of training data and reduce overfitting
- B
To convert all images to grayscale
- C
To remove noisy images from the dataset
- D
To reduce the size of the dataset for faster training
Correct answer
ATo increase the variety of training data and reduce overfitting
Explanation
Data augmentation (e.g., random flips, rotations) artificially expands the training set, making the model more robust.
- A
- 16
What is the effect of a dropout layer in a neural network?
- A
It randomly turns off a fraction of neurons during training to prevent overfitting
- B
It increases the number of filters in convolutional layers
- C
It adds noise to the input images
- D
It reduces the learning rate during training
Correct answer
AIt randomly turns off a fraction of neurons during training to prevent overfitting
Explanation
Dropout randomly disables a percentage of connections, forcing the network to learn redundant representations and avoid overfitting.
- A
- 17
What is overfitting?
- A
When the model achieves high accuracy on both training and validation sets
- B
When the training loss decreases but validation loss also decreases
- C
When the model fails to learn anything from the training data
- D
When the model performs well on training data but poorly on new, unseen data
Correct answer
DWhen the model performs well on training data but poorly on new, unseen data
Explanation
Overfitting occurs when the model memorizes the training data and cannot generalize to new data, as seen when training accuracy was 100% but validation accuracy was lower.
- A
- 18
In the hot dog classifier, why was it necessary to rebalance the dataset?
- A
Because the original dataset had many more not-hot-dog images than hot dog images
- B
Because the training set was too large to fit in memory
- C
Because the images were all different sizes
- D
Because the validation set contained no hot dogs
Correct answer
ABecause the original dataset had many more not-hot-dog images than hot dog images
Explanation
The dataset had only 750 hot dog images but many more not-hot-dog images, so rebalancing was needed to avoid bias.
- A
- 19
Why was the 'from_logits' parameter set to True in the binary cross-entropy loss?
- A
Because the optimizer required logits as input
- B
Because the final layer did not apply a sigmoid activation, so the loss function expects raw logits
- C
Because the model output was already normalized between 0 and 1
- D
Because the labels were not one-hot encoded
Correct answer
BBecause the final layer did not apply a sigmoid activation, so the loss function expects raw logits
Explanation
Since the output layer had no activation, the model outputs logits (unscaled values), and
from_logits=Truetells the loss function to apply the sigmoid internally. - A
- 20
What is the purpose of the 'cache' operation in the TensorFlow data pipeline?
- A
To store the dataset in memory or local storage for faster access during training
- B
To batch the data into groups of a specified size
- C
To prefetch the next batch while the model is training
- D
To shuffle the dataset randomly each epoch
Correct answer
ATo store the dataset in memory or local storage for faster access during training
Explanation
Caching saves the dataset after preprocessing so that operations like file opening are not repeated each epoch, speeding up training.
- A

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