Neural Networks Intro
- 30Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What was the primary inspiration for the development of artificial neural networks?
What was the primary inspiration for the development of artificial neural networks?
30 questions
- 1
What was the primary inspiration for the development of artificial neural networks?
- A
The architecture of the first digital computers
- B
The structure of the human brain and its neurons
- C
The principles of Boolean algebra and logic gates
- D
The mathematical theory of linear algebra
Correct answer
BThe structure of the human brain and its neurons
Explanation
Artificial neural networks were inspired by biological neural networks, particularly the way neurons in the human brain are connected and communicate via electrical signals.
- A
- 2
In a biological neural network, what important property did scientists observe about neurons?
- A
They are connected to each other and can propagate electrical signals and become activated
- B
They only receive signals but never send them
- C
They are isolated cells that do not communicate with each other
- D
They are all identical in function and structure
Correct answer
AThey are connected to each other and can propagate electrical signals and become activated
Explanation
Scientists observed that neurons are connected, receive and propagate electrical signals, and can become activated, which inspired artificial neurons.
- A
- 3
What is an artificial neural network (ANN) fundamentally?
- A
A database of labeled examples used for classification
- B
A physical network of electronic components that mimic the brain
- C
A set of rules for programming intelligent behavior
- D
A mathematical model for learning inspired by biological neural networks
Correct answer
DA mathematical model for learning inspired by biological neural networks
Explanation
An artificial neural network is a mathematical model for learning, inspired by biological neural networks. It maps inputs to outputs through a structure of units and weights.
- A
- 4
In the hypothesis function for a simple neural network with inputs x1 and x2, what does the term w0 represent?
- A
The weight for input x2
- B
The weight for input x1
- C
A bias term that shifts the function up or down
- D
The output of the activation function
Correct answer
CA bias term that shifts the function up or down
Explanation
w0 is the bias term, also called weight 0, which is not multiplied by any input; it shifts the activation function's value. It is often used to adjust the threshold.
- A
- 5
What is the output of the step activation function when the input is -1?
- A
-1
- B
1
- C
Undefined
- D
0
Correct answer
D0
Explanation
The step function outputs 1 if the input is at least 0, and 0 otherwise. Since -1 is less than 0, the output is 0.
- A
- 6
Which activation function produces an S-shaped curve and outputs values between 0 and 1, often interpreted as a probability?
- A
Rectified linear unit (ReLU)
- B
Logistic sigmoid function
- C
Softmax function
- D
Step function
Correct answer
BLogistic sigmoid function
Explanation
The logistic sigmoid function has an S-shaped curve and outputs a value in (0,1), making it suitable for representing probabilities.
- A
- 7
How does the ReLU activation function behave for negative inputs?
- A
It outputs -1
- B
It outputs a small positive number
- C
It outputs 0
- D
It outputs the input value unchanged
Correct answer
CIt outputs 0
Explanation
ReLU takes the maximum of the input and 0. For negative inputs, the output is 0; for positive inputs, it outputs the input unchanged.
- A
- 8
In a neural network implementing the OR function with two binary inputs, what bias value is used along with weights of 1 for each input?
- A
-2
- B
1
- C
0
- D
-1
Correct answer
D-1
Explanation
For the OR function, weights 1 and bias -1 with a step activation correctly output 0 only when both inputs are 0, and 1 otherwise.
- A
- 9
What is the primary limitation of a single perceptron (a single unit with a binary activation)?
- A
It always overfits the training data
- B
It cannot handle more than two inputs
- C
It can only learn linearly separable decision boundaries
- D
It requires too many training examples
Correct answer
CIt can only learn linearly separable decision boundaries
Explanation
A single perceptron defines a linear decision boundary. It cannot solve problems where classes are not linearly separable, such as the XOR problem.
- A
- 10
In gradient descent for training neural networks, what is the first step after initializing weights randomly?
- A
Propagate the error backward through the network
- B
Calculate the gradient based on all data points
- C
Update the weights according to the gradient
- D
Choose a learning rate
Correct answer
BCalculate the gradient based on all data points
Explanation
Gradient descent repeats: calculate the gradient (direction of steepest descent) based on all data, then update weights a small step in that direction. Starting from random weights, we first calculate the gradient.
- A
- 11
Why is standard gradient descent considered computationally expensive for large datasets?
- A
It requires a validation set for every update
- B
It cannot run on modern GPUs
- C
It requires calculating the gradient using all data points each iteration
- D
It uses only one data point at a time, which is slow to converge
Correct answer
CIt requires calculating the gradient using all data points each iteration
Explanation
Standard gradient descent computes the gradient over the entire dataset, which can be very slow with large datasets because every iteration processes all data.
- A
- 12
What is the key difference between stochastic gradient descent (SGD) and standard gradient descent?
- A
SGD calculates the gradient using a single randomly chosen data point at each step
- B
SGD uses all data points but with a different loss function
- C
SGD uses a fixed learning rate while gradient descent adjusts it
- D
SGD is only used for unsupervised learning
Correct answer
ASGD calculates the gradient using a single randomly chosen data point at each step
Explanation
Stochastic gradient descent estimates the gradient using one data point per iteration, making it faster but with a less accurate gradient estimate compared to using all data.
- A
- 13
What is mini-batch gradient descent?
- A
A method that combines gradient descent with backpropagation in a single step
- B
A method that uses the entire dataset but only every few iterations
- C
A method that divides the dataset into small batches and uses each batch to compute the gradient
- D
A method that uses a single data point but trains for many epochs
Correct answer
CA method that divides the dataset into small batches and uses each batch to compute the gradient
Explanation
Mini-batch gradient descent is a middle ground: it uses small, random batches of data to compute the gradient, balancing speed and accuracy.
- A
- 14
What is the purpose of backpropagation in training multilayer neural networks?
- A
To randomly initialize the weights of all layers
- B
To propagate the error from the output layer back to hidden layers to update weights
- C
To propagate inputs forward through the network to compute the output
- D
To reduce the number of units in the network during training
Correct answer
BTo propagate the error from the output layer back to hidden layers to update weights
Explanation
Backpropagation computes the gradient of the loss with respect to each weight by propagating the error backward from the output layer through hidden layers, enabling weight updates.
- A
- 15
In the context of neural networks, what is dropout and why is it used?
- A
A regularization technique that randomly removes units during training to prevent overfitting
- B
A technique to add noise to the input data to improve robustness
- C
A method to permanently delete irrelevant neurons from the network
- D
A way to reduce the learning rate when training stalls
Correct answer
AA regularization technique that randomly removes units during training to prevent overfitting
Explanation
Dropout temporarily drops randomly selected units (and their connections) during training. This prevents over-reliance on specific units and reduces overfitting.
- A
- 16
In a multilayer neural network, what role do hidden layers play?
- A
They directly output the final classification without any processing
- B
They learn intermediate representations or features by combining inputs to model complex functions
- C
They store the training data for later retrieval
- D
They reduce the number of input units needed
Correct answer
BThey learn intermediate representations or features by combining inputs to model complex functions
Explanation
Hidden layers allow the network to learn multiple decision boundaries or features that combine to solve non-linearly separable problems.
- A
- 17
What does the term 'deep neural network' refer to?
- A
A neural network trained with backpropagation
- B
A neural network that uses deep learning algorithms
- C
A neural network with a very large number of input units
- D
A neural network with multiple hidden layers
Correct answer
DA neural network with multiple hidden layers
Explanation
A deep neural network is characterized by having multiple hidden layers, allowing it to model hierarchical features.
- A
- 18
Which of the following is NOT a hyperparameter in a neural network?
- A
The number of hidden layers
- B
The activation function used
- C
The number of units in a hidden layer
- D
The weights of the connections
Correct answer
DThe weights of the connections
Explanation
Weights are learned parameters, not hyperparameters. Hyperparameters like number of layers, units, and activation function are set before training.
- A
- 19
In computer vision, how is a grayscale image typically represented numerically?
- A
As a 1D list of RGB values for each pixel
- B
As a 3D tensor with separate channels for red, green, and blue
- C
As a single number representing the average brightness
- D
As a 2D grid of pixel values, each ranging from 0 to 255
Correct answer
DAs a 2D grid of pixel values, each ranging from 0 to 255
Explanation
A grayscale image has one intensity value per pixel, often 0 (black) to 255 (white), arranged in a 2D grid.
- A
- 20
What is image convolution in the context of neural networks?
- A
Combining two images by averaging their pixel values
- B
Flattening a 2D image into a 1D vector
- C
Applying a filter (kernel) to an image to produce a feature map by sliding the kernel across the image
- D
Reducing the size of an image by selecting maximum values in regions
Correct answer
CApplying a filter (kernel) to an image to produce a feature map by sliding the kernel across the image
Explanation
Convolution slides a kernel over the image, computing element-wise multiplication and summing to produce a feature map that highlights features like edges.
- A
- 21
What does the kernel with 8 in the center and -1 on all neighbors detect in an image?
- A
Edges where a pixel's value differs from its neighbors
- B
Regions of uniform color
- C
The average brightness of the image
- D
Horizontal lines only
Correct answer
AEdges where a pixel's value differs from its neighbors
Explanation
This kernel produces large positive values when the center pixel is different from its neighbors, thus detecting edges. Uniform areas yield near zero values.
- A
- 22
What is the purpose of max-pooling in a convolutional neural network?
- A
To randomly drop out pixels to prevent overfitting
- B
To increase the resolution of the image by interpolating values
- C
To reduce the spatial dimensions of feature maps while retaining the most salient features
- D
To apply a non-linear activation function to the feature maps
Correct answer
CTo reduce the spatial dimensions of feature maps while retaining the most salient features
Explanation
Max-pooling selects the maximum value from each region, downsampling the feature map and making the representation more robust to small translations.
- A
- 23
In a typical CNN architecture, what is the correct order of layers after the input image?
- A
Convolution, pooling, flatten, then dense layers
- B
Pooling, convolution, flatten, then dense layers
- C
Flatten, convolution, pooling, then dense layers
- D
Dense layers, convolution, pooling, then flatten
Correct answer
AConvolution, pooling, flatten, then dense layers
Explanation
A typical CNN applies convolution followed by pooling to extract features, then flattens the result and passes it through one or more dense layers for classification.
- A
- 24
What is the softmax activation function typically used for in neural networks?
- A
To ensure all outputs are non-negative by setting negative values to 0
- B
To convert a vector of raw scores into a probability distribution over multiple classes
- C
To reduce the number of output units by combining them
- D
To output a binary value (0 or 1) for binary classification
Correct answer
BTo convert a vector of raw scores into a probability distribution over multiple classes
Explanation
Softmax takes a vector and produces probabilities that sum to 1, making it ideal for multi-class classification problems.
- A
- 25
What is a key limitation of feed-forward neural networks that recurrent neural networks (RNNs) address?
- A
Feed-forward networks cannot handle sequential data with variable-length inputs or outputs
- B
Feed-forward networks cannot use backpropagation
- C
Feed-forward networks require too many layers to be effective
- D
Feed-forward networks are too slow to train
Correct answer
AFeed-forward networks cannot handle sequential data with variable-length inputs or outputs
Explanation
Feed-forward networks have fixed-size input and output, making them unsuitable for sequences. RNNs can process variable-length sequences by maintaining a hidden state.
- A
- 26
How does a recurrent neural network (RNN) maintain information across time steps?
- A
By increasing the number of hidden units dynamically
- B
By using a convolutional layer to process sequences
- C
By storing all past inputs in a separate memory buffer
- D
By feeding its output back as input for the next time step, creating a memory of past inputs
Correct answer
DBy feeding its output back as input for the next time step, creating a memory of past inputs
Explanation
RNNs have connections that feed the output or hidden state back into the network at the next time step, allowing them to accumulate information over time.
- A
- 27
Which type of RNN architecture is best suited for a task like image captioning, where a single image is used to generate a sequence of words?
- A
Many-to-one architecture
- B
One-to-one architecture
- C
One-to-many architecture
- D
Many-to-many architecture
Correct answer
COne-to-many architecture
Explanation
Image captioning takes one input (image) and produces many outputs (words), so a one-to-many RNN architecture is appropriate.
- A
- 28
For sentiment analysis of a movie review (sequence of words) to classify it as positive or negative, which RNN architecture is used?
- A
Many-to-one architecture
- B
One-to-many architecture
- C
Many-to-many architecture
- D
One-to-one architecture
Correct answer
AMany-to-one architecture
Explanation
The input is a sequence (many words), and the output is a single classification (positive or negative), so a many-to-one architecture is used.
- A
- 29
What is the many-to-many architecture of RNN typically used for?
- A
Classifying a video into a single category
- B
Machine translation, where both input and output are sequences of variable length
- C
Image classification with a single label
- D
Generating a caption from an image
Correct answer
BMachine translation, where both input and output are sequences of variable length
Explanation
Machine translation takes a sequence (source language) and outputs a sequence (target language), often of different lengths, making many-to-many RNNs suitable.
- A
- 30
What does LSTM stand for in the context of recurrent neural networks?
- A
Localized Stochastic Transformation Method
- B
Large Sequential Training Module
- C
Long Short-Term Memory
- D
Linear Sequential Temporal Model
Correct answer
CLong Short-Term Memory
Explanation
LSTM stands for Long Short-Term Memory, a type of RNN designed to capture long-range dependencies in sequences.
- A

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