1. Home
  2. Explore
  3. Computer Science
  4. Neural Networks Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Neural Networks Overview

  • 23Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Deep Learning Basics

What is the defining characteristic of a deep neural network?

23 questions

  1. 1

    What is the defining characteristic of a deep neural network?

    1. A

      It uses ReLU activation functions exclusively.

    2. B

      It uses convolutional layers instead of fully connected layers.

    3. C

      It has at least two output layers.

    4. D

      It has more than one hidden layer.

    Correct answer
    D

    It has more than one hidden layer.

    Explanation

    A deep neural network is defined by having multiple hidden layers, typically more than one, enabling hierarchical feature learning.

  2. 2

    What distinguishes a deep neural network from the two-layer neural networks discussed previously?

    1. A

      Deep networks do not require an output layer for classification.

    2. B

      Deep networks use linear activation functions, while two-layer networks use nonlinear ones.

    3. C

      Deep networks have fewer parameters than two-layer networks.

    4. D

      Deep networks learn features through multiple hidden layers, while two-layer networks learn only one set of features.

    Correct answer
    D

    Deep networks learn features through multiple hidden layers, while two-layer networks learn only one set of features.

    Explanation

    In two-layer networks, only one hidden layer constructs features. Deep networks extend this by stacking multiple hidden layers to learn increasingly abstract features.

  3. 3

    Which of the following is a key motivation for using convolutional neural networks (CNNs) on image data?

    1. A

      CNNs require less training data than fully connected networks.

    2. B

      CNNs eliminate the need for activation functions.

    3. C

      CNNs automatically generate labeled data.

    4. D

      Spatial locality and translation invariance of image features.

    Correct answer
    D

    Spatial locality and translation invariance of image features.

    Explanation

    Images exhibit spatial locality (nearby pixels are related) and translation invariance (objects can appear anywhere). CNNs encode these properties through weight sharing and local connectivity.

  4. 4

    What significant milestone is associated with the AlexNet model in 2012?

    1. A

      It introduced the concept of backpropagation for neural networks.

    2. B

      It won the ImageNet challenge by a large margin using a deep convolutional neural network.

    3. C

      It achieved human-level performance on all image classification tasks.

    4. D

      It was the first neural network to use GPU acceleration.

    Correct answer
    B

    It won the ImageNet challenge by a large margin using a deep convolutional neural network.

    Explanation

    AlexNet, a deep CNN with about 8 layers, dramatically outperformed other methods in the 2012 ImageNet Large Scale Visual Recognition Challenge, sparking the deep learning boom.

  5. 5

    What were two key factors that enabled the resurgence of deep learning in the 2010s?

    1. A

      The development of support vector machines and random forests.

    2. B

      Better computation (GPUs) and more labeled data.

    3. C

      The invention of backpropagation and the perceptron.

    4. D

      Increased use of cloud computing and blockchain technology.

    Correct answer
    B

    Better computation (GPUs) and more labeled data.

    Explanation

    GPUs provided massive parallelization suited for CNNs, and the availability of large labeled datasets (e.g., via Mechanical Turk) allowed deeper models to be trained effectively.

  6. 6

    How is a grayscale image typically encoded as input to a neural network?

    1. A

      The image is converted to a vector of binary values indicating edges.

    2. B

      Each pixel is represented by a single intensity value, usually from 0 to 255.

    3. C

      The image is represented as a 2D array of RGB triples.

    4. D

      Each pixel is represented by three values (red, green, blue).

    Correct answer
    B

    Each pixel is represented by a single intensity value, usually from 0 to 255.

    Explanation

    Grayscale images have one intensity value per pixel. In the lecture, values were simplified to 0 (black) and 1 (white) for illustration, but typically range 0-255.

  7. 7

    What does 'flattening' an image mean in the context of neural network input?

    1. A

      Removing color information to get a grayscale image.

    2. B

      Resizing the image to a fixed width and height.

    3. C

      Converting the 2D pixel grid into a 1D vector by ordering all pixel values.

    4. D

      Applying a filter to reduce the image size.

    Correct answer
    C

    Converting the 2D pixel grid into a 1D vector by ordering all pixel values.

    Explanation

    Flattening rearranges the 2D pixel grid into a 1D vector, where each pixel becomes a feature (x1, x2, ..., xn) for the network.

  8. 8

    What is the result of flattening a 5x5 grayscale image?

    1. A

      A 5x5 matrix.

    2. B

      A 1x25 vector.

    3. C

      A 25x1 vector.

    4. D

      A vector of length 25.

    Correct answer
    D

    A vector of length 25.

    Explanation

    Flattening a 5x5 image produces a 1D vector with 25 elements (5*5=25). The vector could be row or column; the key is the number of features.

  9. 9

    In a fully connected layer with 10 inputs and 10 outputs, how many weights (including biases) are there?

    1. A
    2. B
    3. C
    4. D
    Correct answer
    D

    Explanation

    Each of the 10 outputs has 10 weights plus 1 bias, so 11 per output. Total = 10 * 11 = 110.

  10. 10

    How many parameters (weights plus bias) does a convolutional filter of size 3 have?

    1. A
    2. B
    3. C
    4. D
    Correct answer
    C

    Explanation

    A filter of size 3 has 3 weights (w1, w2, w3) and 1 bias, totaling 4 parameters. These are shared across all positions in the image.

  11. 11

    What operation is performed when a filter is applied to a region of an image in a convolutional layer?

    1. A

      Both A and C are correct descriptions.

    2. B

      An element-wise multiplication followed by a sum, but only for contiguous regions.

    3. C

      A dot product between the filter weights and the pixel values in that region.

    4. D

      A matrix multiplication between the filter and the entire image.

    Correct answer
    A

    Both A and C are correct descriptions.

    Explanation

    The convolution operation computes a dot product (element-wise multiplication and sum) between the filter and a local region of the image. Options A and C both describe this correctly.

  12. 12

    In a 1D convolution with filter [-1, 1, -1] on a binary image, what pattern does this filter detect?

    1. A

      An isolated 1 flanked by two 0s.

    2. B

      Any region containing at least one 1.

    3. C

      A sequence of three consecutive 1s.

    4. D

      An isolated 0 flanked by two 1s.

    Correct answer
    A

    An isolated 1 flanked by two 0s.

    Explanation

    The dot product yields a positive value only when the center pixel is 1 and the neighbors are 0, because -10 + 11 + -1*0 = 1 (actually 1, but ReLU then gives 1).

  13. 13

    Why is padding often used in convolutional layers?

    1. A

      To introduce noise and improve generalization.

    2. B

      To reduce the computational cost of convolution.

    3. C

      To increase the number of parameters in the network.

    4. D

      To allow the filter to be applied at the edges of the image and maintain spatial dimensions.

    Correct answer
    D

    To allow the filter to be applied at the edges of the image and maintain spatial dimensions.

    Explanation

    Padding (typically zeros) around the image edges enables the filter to cover pixels at the boundaries, and can keep the output size the same as the input size.

  14. 14

    After applying a 3x3 filter to a 5x5 image without padding, what is the size of the output feature map?

    1. A

      7x7.

    2. B

      1x1.

    3. C

      5x5.

    4. D

      3x3.

    Correct answer
    D

    3x3.

    Explanation

    Without padding, a 3x3 filter can only be centered at positions where it fits entirely within the image, resulting in a 3x3 output (5-3+1=3 in each dimension).

  15. 15

    What effect does a stride of 2 have on the output size of a convolutional or pooling layer?

    1. A

      It doubles the spatial dimensions.

    2. B

      It increases the number of channels.

    3. C

      It has no effect on spatial dimensions.

    4. D

      It reduces the spatial dimensions by roughly half.

    Correct answer
    D

    It reduces the spatial dimensions by roughly half.

    Explanation

    A stride of 2 means the filter moves 2 pixels at a time, skipping positions, thus reducing the output width and height approximately by a factor of 2.

  16. 16

    In max pooling, what value is output for a given pooling window?

    1. A

      The value of the center pixel in the window.

    2. B

      The sum of the pixel values in the window.

    3. C

      The average of the pixel values in the window.

    4. D

      The maximum value among the pixels in the window.

    Correct answer
    D

    The maximum value among the pixels in the window.

    Explanation

    Max pooling returns the maximum value from each local region, effectively detecting whether any feature was activated in that region.

  17. 17

    How many learnable parameters does a max pooling layer have?

    1. A

      One parameter per pooling window.

    2. B

      One parameter per pixel in the input.

    3. C

      None.

    4. D

      One parameter per channel.

    Correct answer
    C

    None.

    Explanation

    Max pooling has no learnable parameters; it simply computes a fixed function (the maximum) over local regions. The window size and stride are hyperparameters.

  18. 18

    What is the purpose of the final fully connected layer in a typical CNN for classification?

    1. A

      To combine the features learned by previous layers into a classification or regression output.

    2. B

      To detect edges and simple patterns in the input image.

    3. C

      To reduce the spatial dimensions of the feature maps.

    4. D

      To introduce non-linearity through an activation function.

    Correct answer
    A

    To combine the features learned by previous layers into a classification or regression output.

    Explanation

    After convolutional and pooling layers, the high-level features are flattened and passed through a fully connected layer (like logistic regression) to produce class scores.

  19. 19

    In the context of CNNs, what does a 'filter bank' refer to?

    1. A

      The set of activation functions used in the network.

    2. B

      A single filter that is reused across all channels.

    3. C

      The collection of all fully connected layers in the network.

    4. D

      A set of multiple filters applied to the same input, producing multiple output channels.

    Correct answer
    D

    A set of multiple filters applied to the same input, producing multiple output channels.

    Explanation

    A filter bank is a collection of filters applied to the input, each producing a separate feature map or channel, adding depth to the output tensor.

  20. 20

    What does the chain rule allow us to compute in the context of training a CNN?

    1. A

      The optimal number of layers for the network.

    2. B

      The accuracy of the model on the training set.

    3. C

      The forward propagation of activations through the network.

    4. D

      The gradient of the loss with respect to the network parameters.

    Correct answer
    D

    The gradient of the loss with respect to the network parameters.

    Explanation

    Backpropagation applies the chain rule to compute gradients of the loss with respect to each parameter, enabling gradient-based optimization.

  21. 21

    How does the derivative dZ_i/dW_j for a convolutional layer differ from that of a fully connected layer?

    1. A

      It involves the input values (or padded values) corresponding to the filter position, and the same weights appear in many derivatives.

    2. B

      It is zero for most parameters because of weight sharing.

    3. C

      It is computed only once per filter because weights are shared.

    4. D

      It is independent of the input data.

    Correct answer
    A

    It involves the input values (or padded values) corresponding to the filter position, and the same weights appear in many derivatives.

    Explanation

    In a convolutional layer, each weight contributes to multiple positions in the output, so its derivative is a sum of products of input values from all positions where that weight is used.

  22. 22

    In the simple 1D regression example with a single filter of size 3, what is the size of the weight matrix W^1?

    1. A

      3x1.

    2. B

      1x3.

    3. C

      3x5.

    4. D

      5x3.

    Correct answer
    A

    3x1.

    Explanation

    The filter has 3 weights (W^1 is a vector of length 3). It is applied via dot product with 3-pixel windows.

  23. 23

    When computing dZ/dW for a convolutional layer, what is the role of padding?

    1. A

      Padding adds extra terms to the derivatives for edge positions, allowing them to be nonzero.

    2. B

      Padding does not affect the derivatives because it is not differentiable.

    3. C

      Padding introduces additional learnable parameters.

    4. D

      Padding makes the derivatives zero at the edges.

    Correct answer
    A

    Padding adds extra terms to the derivatives for edge positions, allowing them to be nonzero.

    Explanation

    Padding effectively extends the input, so derivatives for filters applied near edges include the padded values (usually zeros), which contribute to the gradient calculation.

Question 1 of 23
Question 1 of 23

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent