Neural Networks for Image Recognition
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
In the fruit example, what do the two inputs of the neural network represent?
In the fruit example, what do the two inputs of the neural network represent?
20 questions
- 1
In the fruit example, what do the two inputs of the neural network represent?
- A
The size of the spots and the length of the spikes
- B
The weight and the color of the fruit
- C
The number of seeds and the thickness of the skin
- D
The sweetness and the acidity of the fruit
Correct answer
AThe size of the spots and the length of the spikes
Explanation
The problem uses the size of the spots and the length of the spikes as the two input attributes to predict whether the fruit is safe or poisonous.
- A
- 2
How does the neural network interpret the two outputs for the fruit classification problem?
- A
The first output being positive means safe, negative means poisonous.
- B
The difference between the outputs determines the prediction.
- C
The sum of the two outputs determines the prediction.
- D
The output with the highest value determines the prediction (safe or poisonous).
Correct answer
DThe output with the highest value determines the prediction (safe or poisonous).
Explanation
The network has two outputs; the one with the highest value indicates the predicted class (safe or poisonous). This approach is used because future problems may have more than two classes.
- A
- 3
What is the role of the bias in a neural network node?
- A
It shifts the weighted input, allowing the decision boundary to move away from the origin.
- B
It scales the input values to a standard range.
- C
It determines the slope of the activation function.
- D
It multiplies the weighted input to increase the output.
Correct answer
AIt shifts the weighted input, allowing the decision boundary to move away from the origin.
Explanation
Biases are added to the weighted sum (weighted input) to allow the decision boundary to shift, not just rotate around the origin.
- A
- 4
Why are hidden layers added to a neural network?
- A
To ensure the network always has a linear decision boundary.
- B
To increase the number of inputs and outputs.
- C
To allow the network to learn non-linear decision boundaries.
- D
To reduce the number of weights needed.
Correct answer
CTo allow the network to learn non-linear decision boundaries.
Explanation
Hidden layers, along with activation functions, enable the network to create non-linear decision boundaries, which are necessary for more complex problems.
- A
- 5
What is the purpose of an activation function like the sigmoid in a neural network?
- A
To reduce the number of nodes in the network.
- B
To introduce non-linearity, allowing the network to learn complex patterns.
- C
To normalize the input values to be between 0 and 1.
- D
To accelerate the training process by making calculations simpler.
Correct answer
BTo introduce non-linearity, allowing the network to learn complex patterns.
Explanation
Activation functions like sigmoid introduce non-linearity, which is essential for the network to learn complex relationships and create non-linear decision boundaries.
- A
- 6
What does the cost function measure in a neural network?
- A
How well the network is performing by comparing outputs to expected values.
- B
The accuracy of the network on the training data.
- C
The speed at which the network processes data.
- D
The total number of weights and biases in the network.
Correct answer
AHow well the network is performing by comparing outputs to expected values.
Explanation
The cost function (e.g., mean squared error) measures the difference between the network's output and the desired output, providing a measure of performance.
- A
- 7
In gradient descent, what does the learning rate control?
- A
How much the weights and biases are adjusted during each update.
- B
The size of the training data batch.
- C
The initial values of the weights.
- D
The number of training iterations to perform.
Correct answer
AHow much the weights and biases are adjusted during each update.
Explanation
The learning rate scales the gradient step; a high learning rate can cause large jumps that may overshoot the minimum, while a low learning rate makes training slower.
- A
- 8
Why is mini-batch gradient descent often preferred over full-batch gradient descent?
- A
It eliminates the need for a learning rate.
- B
It always produces smoother convergence than full-batch.
- C
It speeds up the learning process and can help escape saddle points.
- D
It guarantees finding the global minimum of the cost function.
Correct answer
CIt speeds up the learning process and can help escape saddle points.
Explanation
Mini-batch gradient descent processes smaller subsets of data per iteration, speeding up computation and introducing noise that can help escape saddle points.
- A
- 9
What is the main advantage of using backpropagation to calculate gradients?
- A
It guarantees zero error on the training data after one epoch.
- B
It approximates gradients by randomly perturbing each weight.
- C
It computes all gradients in just one forward and one backward pass through the network.
- D
It only requires the cost function to be evaluated once per weight.
Correct answer
CIt computes all gradients in just one forward and one backward pass through the network.
Explanation
Backpropagation efficiently calculates the gradient of the cost with respect to every weight and bias using the chain rule, requiring only one forward pass and one backward pass.
- A
- 10
In backpropagation, what is the chain rule used for?
- A
To update the weights in a random order.
- B
To compute how changes in earlier layers affect the cost by multiplying partial derivatives.
- C
To determine the optimal learning rate.
- D
To select which activation function to use.
Correct answer
BTo compute how changes in earlier layers affect the cost by multiplying partial derivatives.
Explanation
The chain rule allows us to compute partial derivatives of the cost with respect to weights in earlier layers by multiplying derivatives through the network.
- A
- 11
What is the derivative of the sigmoid activation function σ(x)=1+e−x1​?
- A
e−xσ(x)2
- B
σ(x)(1−σ(x))
- C
σ(x)2
- D
σ(x)(1+σ(x))
Correct answer
Bσ(x)(1−σ(x))
Explanation
The derivative of the sigmoid is σ(x)(1−σ(x)), which is simple to compute and is used in backpropagation.
- A
- 12
How many input nodes are needed for a neural network to classify 28x28 pixel handwritten digit images?
- A
10
- B
100
- C
28
- D
784
Correct answer
D784
Explanation
Each image is 28x28 = 784 pixels, so the network requires 784 input nodes to take in all pixel values.
- A
- 13
On the handwritten digit test set, what accuracy did the author achieve with a network that included a hidden layer, improved activation functions, and momentum?
- A
Approximately 95%
- B
Approximately 99%
- C
Approximately 97%
- D
Approximately 90%
Correct answer
CApproximately 97%
Explanation
After tuning, the network reached around 97% accuracy on the test set of handwritten digits.
- A
- 14
What technique did the author use to improve generalization and reduce overfitting when training on handwritten digits?
- A
Applying random transformations (rotation, scaling, shifting, noise) to training images.
- B
Removing all biases from the network.
- C
Training for only one epoch.
- D
Increasing the number of hidden layers to 10.
Correct answer
AApplying random transformations (rotation, scaling, shifting, noise) to training images.
Explanation
Using data augmentation (random transformations) on the training images helped the network learn more general patterns and reduced overfitting.
- A
- 15
According to the video, what is the human accuracy on the fashion MNIST dataset?
- A
Approximately 95%
- B
Approximately 75%
- C
Approximately 83%
- D
Approximately 89%
Correct answer
CApproximately 83%
Explanation
The video mentions that human performance on the fashion MNIST dataset is around 83%, while the network achieved about 89%.
- A
- 16
How many categories were used in the doodle recognition task (from the Quick Draw dataset)?
- A
345
- B
50
- C
10
- D
100
Correct answer
C10
Explanation
The author selected 10 categories out of the 345 available in the Quick Draw dataset for the doodle recognition task.
- A
- 17
When trying to classify 32x32 color images of 10 classes (CIFAR-10 style), what accuracy did the simple network achieve?
- A
Approximately 80%
- B
Approximately 90%
- C
Approximately 70%
- D
Approximately 53%
Correct answer
DApproximately 53%
Explanation
The simple network only achieved about 53% accuracy on the color image dataset, indicating the task is much harder and requires more advanced architectures like CNNs.
- A
- 18
What is the difference between a local minimum and a global minimum in the context of gradient descent?
- A
A local minimum is a point where the cost is lower than all neighboring points, but not necessarily the lowest possible; a global minimum is the lowest possible cost.
- B
A local minimum is the starting point of the network; a global minimum is the final point after training.
- C
A local minimum is found with mini-batch gradient descent; a global minimum is found with full-batch gradient descent.
- D
A local minimum occurs when the learning rate is too high; a global minimum occurs with a low learning rate.
Correct answer
AA local minimum is a point where the cost is lower than all neighboring points, but not necessarily the lowest possible; a global minimum is the lowest possible cost.
Explanation
A local minimum is a valley in the cost function that is not the lowest overall, while the global minimum is the absolute lowest point. Gradient descent may get stuck in local minima.
- A
- 19
How does momentum help gradient descent?
- A
It increases the learning rate over time.
- B
It randomly restarts the weights when progress stalls.
- C
It reduces the number of weights in the network.
- D
It adds a fraction of the previous update to the current update, helping accelerate and smooth the descent.
Correct answer
DIt adds a fraction of the previous update to the current update, helping accelerate and smooth the descent.
Explanation
Momentum uses the past gradients to accelerate movement in consistent directions and dampen oscillations, often leading to faster convergence.
- A
- 20
In the context of the video, why does adding a hidden layer not immediately help without a non-linear activation function?
- A
Non-linear activation functions are needed only in the output layer.
- B
Hidden layers increase the number of parameters, which always helps regardless of activation.
- C
Without non-linearity, multiple linear layers are equivalent to a single linear layer, so the decision boundary remains linear.
- D
Hidden layers only work with sigmoid activation; otherwise they have no effect.
Correct answer
CWithout non-linearity, multiple linear layers are equivalent to a single linear layer, so the decision boundary remains linear.
Explanation
Without non-linear activation functions, stacking linear layers is algebraically equivalent to a single linear layer, so no additional representational power is gained.
- A

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