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

Study methods

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

Convolutional Neural Networks

  • 80Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Image Classification

What kind of task is a Convolutional Neural Network (CNN) especially designed for, and what is one example?

80 questions

  1. 1

    What kind of task is a Convolutional Neural Network (CNN) especially designed for, and what is one example?

    Model answer

    A CNN is a neural-network architecture designed especially for image-related tasks, including image classification.

    Explanation

    CNNs are designed around properties of images, such as useful patterns appearing in small regions and at different locations.

  2. 2

    Why are images commonly rescaled before being passed to an image-recognition model?

    Model answer

    The model is assumed to receive images of a fixed size. Images of different sizes or shapes are commonly rescaled to the same dimensions before being input.

    Explanation

    A fixed input size allows the model to process images consistently; resizing is a common way to meet this requirement.

  3. 3

    How is the target class represented in the image-classification setup described?

    Model answer

    The target label is a one-hot vector: its dimension for the correct class is 1, and the dimensions for other classes are 0.

    Explanation

    In a one-hot representation, the correct class has value 1 and every other class has value 0.

  4. 4

    What does the length of the one-hot class vector determine?

    Model answer

    The vector length determines the number of classes the model can represent; for example, a length of 2,000 represents 2,000 possible classes.

    Explanation

    Each possible class requires a corresponding dimension in the output representation.

  5. 5

    How are the model's output and the target label compared during classification?

    Model answer

    The model applies Softmax to produce its output, and training aims to make the cross-entropy between that output and the target label as small as possible.

    Explanation

    The predicted output is compared with the target label using cross-entropy, which the training objective seeks to reduce.

  6. 6

    How is an image represented as a tensor, and what does each of its three dimensions represent?

    Model answer

    A digital image is represented as a three-dimensional tensor whose dimensions correspond to width, height, and number of channels.

    Explanation

    The image tensor has separate dimensions for spatial position and color channel.

  7. 7

    What does the channel dimension represent in a typical color image?

    Model answer

    A color image typically has three channels, corresponding to red, green, and blue; each pixel stores an intensity for each channel.

    Explanation

    A color pixel contains an intensity value for each of the red, green, and blue channels.

  8. 8

    How can a 100imes100100 imes100100imes100 RGB image be converted into an input vector for a fully connected network?

    Model answer

    Flattening lists all pixel-channel values in a single vector. A 100imes100100 imes100100imes100 RGB image therefore has 100imes100imes3100 imes100 imes3100imes100imes3 input values.

    Explanation

    Flattening makes the image compatible with a network that expects a vector input.

  9. 9

    If a flattened 100imes100100 imes100100imes100 RGB image feeds a fully connected layer with 1,000 neurons, how many input-to-neuron weights does that layer have?

    Model answer

    The first layer has 1000imes100imes100imes3=30,000,0001000 imes100 imes100 imes3=30{,}000{,}0001000imes100imes100imes3=30,000,000 weights.

    Explanation

    Every input value connects to every first-layer neuron, so the number of weights is the product of the input length and neuron count.

  10. 10

    What trade-off can result from increasing the number of model parameters?

    Model answer

    Adding parameters can increase a model's capacity, but it also increases the risk of overfitting.

    Explanation

    More parameters increase model flexibility, but the greater flexibility can make fitting idiosyncrasies in training data more likely.

  11. 11

    How can detecting visual patterns help a network recognize an object?

    Model answer

    An image-recognition neuron can detect a meaningful pattern in the image, and multiple detected patterns can provide evidence for a class such as a bird.

    Explanation

    A neuron may detect a useful visual cue, such as a beak, eye, or claw, and combine such cues to recognize an object.

  12. 12

    Why might an image-recognition neuron not need to examine the entire image?

    Model answer

    Many important patterns are local, so a neuron can often detect one by examining only a small part of the image rather than the entire image.

    Explanation

    A small image region can contain enough information to detect a local pattern, so examining every pixel is unnecessary for that detection.

  13. 13

    What is a neuron's receptive field?

    Model answer

    A receptive field is the region of the input image that a particular neuron is assigned to examine.

    Explanation

    The receptive field restricts which input values can affect a particular neuron's computation.

  14. 14

    How does a neuron compute an output from a 3imes3imes33 imes3 imes33imes3imes3 receptive field?

    Model answer

    For a 3imes3imes33 imes3 imes33imes3imes3 receptive field, the neuron uses the 27 values as its input, assigns them weights, adds a bias, and computes an output.

    Explanation

    The local values are vectorized and combined with weights and a bias to produce the neuron's output.

  15. 15

    Can different neurons' receptive fields overlap, and what does that allow?

    Model answer

    Yes. Receptive fields may overlap, allowing nearby regions to be examined by multiple neurons.

    Explanation

    Overlapping regions allow patterns near their shared boundaries to be covered by more than one receptive field.

  16. 16

    Can multiple neurons be assigned to one receptive field? Explain why this can be useful.

    Model answer

    Yes. Multiple neurons can be assigned to the same receptive field so that they can detect different patterns there.

    Explanation

    Different neurons can detect different patterns in the same input region.

  17. 17

    What aspects of a receptive field's size and shape can a designer choose?

    Model answer

    Receptive fields can be made larger or smaller, and they can be rectangular rather than square, depending on the task and the patterns to detect.

    Explanation

    The size and shape of the region can be chosen to suit the patterns relevant to the task.

  18. 18

    Can a receptive field use only some image channels, and is that typical in ordinary image CNNs?

    Model answer

    A receptive field can be restricted to selected channels, but typical image CNNs generally use all channels when detecting patterns.

    Explanation

    The standard image setting generally uses all color channels, although a neuron could be designed to examine only selected channels.

  19. 19

    Why are receptive fields usually contiguous even though disconnected regions are possible?

    Model answer

    A receptive field could theoretically include disconnected regions, but ordinary receptive fields are usually contiguous because visual patterns are expected to occur within a localized region.

    Explanation

    The usual design reflects the assumption that a visual pattern occurs in a contiguous location in the image.

  20. 20

    What does kernel size describe in the standard all-channel image setup?

    Model answer

    A kernel size gives the receptive field's spatial height and width. In the standard setup, all input channels are included, so the channel depth need not be specified separately.

    Explanation

    When all channels are included, receptive-field size is conventionally described by its spatial height and width.

  21. 21

    What kernel size is commonly used in image recognition, and how are 7imes77 imes77imes7 and 9imes99 imes99imes9 kernels characterized?

    Model answer

    A 3imes33 imes33imes3 kernel is a common choice; kernels such as 7imes77 imes77imes7 or 9imes99 imes99imes9 are considered relatively large.

    Explanation

    Small kernels are common in image recognition, while sizes such as 7imes77 imes77imes7 or 9imes99 imes99imes9 are relatively large in the described setting.

  22. 22

    How many neurons might commonly be assigned to each receptive-field location?

    Model answer

    A receptive field is commonly handled by a group of neurons, such as 64 or 128, rather than by only one neuron.

    Explanation

    Each location can use a group of neurons to detect a variety of patterns rather than relying on a single detector.

  23. 23

    What is stride, and what are common stride values?

    Model answer

    Stride is the distance a receptive field moves between placements. Values such as 1 or 2 are common.

    Explanation

    Stride specifies how far the receptive field shifts as it is placed at successive locations.

  24. 24

    Why are receptive fields commonly arranged to overlap?

    Model answer

    Overlap helps prevent patterns at the boundary between fields from being missed; this is why stride is often kept small.

    Explanation

    If adjacent fields do not overlap, a pattern located at their boundary might not be detected by any neuron.

  25. 25

    Why is padding used when receptive fields extend beyond an image's boundary?

    Model answer

    Padding supplies values outside the image boundary so that receptive fields can cover edge regions instead of omitting them.

    Explanation

    Padding lets the receptive-field scan include edge locations even when a field would extend beyond the image.

  26. 26

    What is zero padding, and what are two alternative padding choices?

    Model answer

    Zero padding fills out-of-image positions with zeros. Other choices include the image's average value or values taken from its edge.

    Explanation

    Zero padding is one option, but padding can also use other values derived from the image.

  27. 27

    How are receptive fields positioned to cover the entire image?

    Model answer

    Receptive fields are shifted both horizontally and vertically across the image so that each location is covered by at least one field.

    Explanation

    Sweeping across both dimensions provides receptive-field coverage across the image.

  28. 28

    What observation about where visual patterns can appear motivates sharing parameters across image locations?

    Model answer

    A pattern such as a bird's beak can appear at many locations. Detecting the same pattern at each location is a repeated task.

    Explanation

    The same visual feature may be recognized at different image locations, so repeating an identical detector at every location would duplicate work.

  29. 29

    What does parameter sharing mean for neurons that examine different receptive fields?

    Model answer

    Parameter sharing means that neurons assigned to different receptive fields use the same weights and bias, even though their input regions differ.

    Explanation

    The same detector can be reused at different locations while receiving different local pixel values.

  30. 30

    If two neurons share parameters but examine different image regions, must their outputs be identical?

    Model answer

    No. Their parameters are the same, but their inputs come from different image regions, so their outputs can be different.

    Explanation

    The neurons apply the same weights to different local inputs, so their computed outputs can differ.

  31. 31

    Why is parameter sharing typically used between neurons with different receptive fields rather than duplicate neurons at the same field?

    Model answer

    Sharing parameters between neurons with the same receptive field would make their outputs identical, so sharing is useful across different locations instead.

    Explanation

    If both the parameters and the input region were identical, the neurons would compute the same output.

  32. 32

    How are parameters commonly shared among groups of neurons at different receptive fields?

    Model answer

    Neurons with corresponding roles across receptive fields share parameters: for example, the first neuron at each field shares one set, the second neuron shares another, and so on.

    Explanation

    A detector is reused at each spatial location, reducing the need to learn a separate copy for every location.

  33. 33

    What is a filter in the shared-parameter description of a CNN?

    Model answer

    A filter is a group of shared weights used to detect a pattern across different image locations.

    Explanation

    A filter is the shared parameter set used by corresponding neurons at different spatial locations.

  34. 34

    What two design ideas define a convolutional layer in this account?

    Model answer

    A convolutional layer combines local receptive fields with parameter sharing; a network using such layers is a CNN.

    Explanation

    Local receptive fields restrict what neurons can inspect, and parameter sharing ties the weights of neurons across locations.

  35. 35

    How do receptive fields and parameter sharing constrain a network compared with a fully connected layer?

    Model answer

    Receptive fields restrict neurons to local regions, and parameter sharing forces corresponding neurons at different locations to use identical parameters; both reduce model flexibility.

    Explanation

    A fully connected layer could learn to ignore most of the image or to use different weights at each location, while these CNN constraints remove some of those choices.

  36. 36

    Why can a CNN's stronger built-in assumptions be beneficial for images but risky for other tasks?

    Model answer

    CNNs have stronger image-related assumptions, or greater model bias, than fully connected networks. That can help on image tasks but may be unsuitable for other tasks.

    Explanation

    The constraints encode assumptions suited to images, which may help on image tasks while being inappropriate for tasks without those properties.

  37. 37

    How does a filter produce a response at one position in an image?

    Model answer

    A filter is placed over a local image region, and the filter values are combined with the region's values by an inner product to produce a response.

    Explanation

    Each filter is matched against local image values, and the result at each location indicates how strongly the pattern matches there.

  38. 38

    How is a filter applied across an image, and what controls the distance between its successive positions?

    Model answer

    The filter is moved across the image, computing a local response at each position. The distance between successive positions is the stride.

    Explanation

    The filter is repeatedly evaluated at shifted locations; the shift between evaluations is determined by stride.

  39. 39

    With stride 1 and no padding, what is the spatial size of the output when a 3imes33 imes33imes3 filter is applied to a 6imes66 imes66imes6 image?

    Model answer

    It produces a 4imes44 imes44imes4 response map.

    Explanation

    A 3imes33 imes33imes3 filter has nine spatial values, and applying it at all valid positions on a 6imes66 imes66imes6 image with stride 1 gives a 4imes44 imes44imes4 set of responses.

  40. 40

    How can a filter's responses indicate that a particular pattern occurs in an image?

    Model answer

    A filter detects a pattern when its values align with that pattern in an image region, producing a stronger response there.

    Explanation

    A filter is designed to respond strongly to a particular local pattern, such as a line or a repeated arrangement of values.

  41. 41

    What is a feature map, and how many feature maps are produced by a layer with 64 filters?

    Model answer

    Each filter produces a set of spatial responses, and each set is called a feature map. A layer with 64 filters produces 64 feature maps.

    Explanation

    Different filters can specialize in different patterns and each produces responses at locations across the image.

  42. 42

    How can the output of a convolutional layer be viewed as an image?

    Model answer

    The output can be viewed as a new image whose channels correspond to filters; 64 filters produce an output with 64 channels.

    Explanation

    The feature maps form channels in a new representation of the image, with one channel corresponding to each filter.

  43. 43

    How is a filter's depth related to the number of channels in its input?

    Model answer

    A filter spans the full input-channel depth. For example, its depth is 1 for a grayscale image and 3 for an RGB image.

    Explanation

    The filter depth must match the depth of the input representation being processed.

  44. 44

    If one convolutional layer has 64 filters, what depth must filters in the next layer use, and why?

    Model answer

    If the previous layer has 64 filters, its output has 64 channels, so the next layer's filters span a depth of 64.

    Explanation

    The previous layer's filters determine how many output channels become the next layer's input channels.

  45. 45

    What original-image region can two successive layers of 3imes33 imes33imes3 filters cover at a later position?

    Model answer

    Two successive convolutional layers with 3imes33 imes33imes3 filters can give a later response a 5imes55 imes55imes5 receptive field in the original image.

    Explanation

    Stacking local operations expands the input region that can influence a later response.

  46. 46

    Why can a deep CNN detect larger patterns even when its filters remain small?

    Model answer

    As layers are stacked, their receptive fields in the original image grow, allowing small filters to detect larger-scale patterns.

    Explanation

    Successive layers combine information from neighboring regions, making deeper units sensitive to larger input regions.

  47. 47

    How do filters in the sliding-window description relate to shared neuron weights?

    Model answer

    The values in a filter are the shared weights used by neurons that detect the same pattern at different image locations.

    Explanation

    The shared weights in the filter correspond to the weights used by neurons at different local receptive fields.

  48. 48

    Why is the filter-scanning operation called convolution, and do filters generally have a bias?

    Model answer

    Scanning a filter across an image applies the same parameters at different receptive fields, which is the convolution operation. Filters generally also have a bias.

    Explanation

    The operation applies shared filter weights at many image locations; common implementations also include a bias.

  49. 49

    What is subsampling, and what effect can it have on image size and recognition?

    Model answer

    Subsampling reduces an image's spatial size; for example, removing alternating rows and columns can reduce its size to one quarter while leaving the object recognizable.

    Explanation

    Subsampling retains a smaller representation while often preserving enough information to identify the object.

  50. 50

    Does pooling learn parameters from data? Explain.

    Model answer

    Pooling has no learnable parameters; it is a fixed operator rather than a layer that learns weights from data.

    Explanation

    Pooling uses a predetermined operation rather than weights learned from training data.

  51. 51

    How does max pooling summarize a group of values, and what are two alternative pooling rules?

    Model answer

    Max pooling selects the largest value in each group. Other choices include selecting a minimum or an average.

    Explanation

    Max pooling takes the largest value from each selected group, while other pooling rules are possible.

  52. 52

    Is the pooling region size fixed? Give examples of possible sizes.

    Model answer

    The group size is configurable; examples include 2imes22 imes22imes2, 3imes33 imes33imes3, and 4imes44 imes44imes4 regions.

    Explanation

    The grouping dimensions determine how many values are combined at each pooling step.

  53. 53

    What happens to spatial dimensions and channel count when a 4imes44 imes44imes4 output is pooled in 2imes22 imes22imes2 regions?

    Model answer

    Pooling usually leaves the number of channels unchanged while reducing the spatial dimensions; for example, a 4imes44 imes44imes4 map pooled in 2imes22 imes22imes2 groups becomes 2imes22 imes22imes2.

    Explanation

    Pooling reduces spatial dimensions by combining groups of spatial values while retaining the channel structure.

  54. 54

    How are convolution and pooling commonly arranged in an image-recognition network?

    Model answer

    A common design alternates several convolutional layers with a pooling operation, such as two convolutions followed by pooling.

    Explanation

    Alternating convolution and pooling is a common way to extract patterns while progressively reducing spatial size.

  55. 55

    Why can pooling harm performance on tasks involving very fine visual details?

    Model answer

    Pooling can reduce performance when the task depends on very fine details, because subsampling may remove relevant information.

    Explanation

    Subsampling can discard fine spatial detail that is important for detecting small features.

  56. 56

    Why might a network use pooling, and why might a full-convolution network omit it?

    Model answer

    Pooling is often used to reduce computation by shrinking spatial representations. With sufficient computing resources, a network can instead use convolution throughout and omit pooling.

    Explanation

    Pooling can reduce the amount of computation by shrinking the image representation; if resources permit, the network may omit it.

  57. 57

    What is flattening, and what usually follows it in a classification network?

    Model answer

    Flattening turns the values in the final feature representation into a vector, which can then be passed to fully connected layers and a final Softmax.

    Explanation

    Flattening converts the final spatial representation into the vector expected by a fully connected layer.

  58. 58

    Outline the main stages of a conventional CNN image-classification pipeline.

    Model answer

    A typical network applies convolutional layers, may apply pooling, flattens the resulting representation, and uses fully connected layers and Softmax to produce a class prediction.

    Explanation

    The described image-classification pipeline combines feature extraction, optional spatial reduction, and final classification.

  59. 59

    How can a Go board be encoded using a 19imes1919 imes1919imes19 representation?

    Model answer

    One representation uses a 19imes1919 imes1919imes19 vector or grid: black stones are encoded as 1, white stones as −1-1−1, and empty positions as 0.

    Explanation

    A board position can be encoded as a spatial grid, with each location indicating whether it contains a black stone, white stone, or no stone.

  60. 60

    Why can choosing the next Go move be framed as a 361-class classification problem?

    Model answer

    The network predicts one of the 19imes19=36119 imes19=36119imes19=361 board positions, so selecting a move can be treated as a 361-class classification problem.

    Explanation

    Every legal board location is a possible output class for the next move.

  61. 61

    Is encoding black stones as 1, white stones as −1-1−1, and empty locations as 0 the only possible representation?

    Model answer

    No. The black, white, and empty values are one possible encoding; other vector representations of the board could also be used.

    Explanation

    The described stone encoding is only one representation; the essential requirement is to encode the board position for the network.

  62. 62

    How can a Go board be interpreted as an image for a CNN?

    Model answer

    A Go board can be viewed as a 19imes1919 imes1919imes19 image in which each pixel corresponds to a possible move location.

    Explanation

    The board can be treated as a small image with one spatial location per playable point.

  63. 63

    How many channels did the original AlphaGo representation use for each board position?

    Model answer

    The original AlphaGo paper represented each board location with 48 channels, meaning 48 values described the situation at that point.

    Explanation

    The cited AlphaGo representation encoded each board location with a feature vector rather than a single color value.

  64. 64

    Give two examples of information represented by the channels in AlphaGo's board input.

    Model answer

    Examples include whether a stone is about to be captured and whether neighboring positions contain stones of a different color.

    Explanation

    The channels describe features of local board situations, including tactical or neighboring-stone information.

  65. 65

    What two properties of Go patterns make CNNs suitable for the game?

    Model answer

    Go shares image-like properties: important patterns can be local, and the same pattern, such as a capture situation, can occur at different board locations.

    Explanation

    Local tactics can often be identified from a limited part of the board, and the same tactical pattern can occur in different locations.

  66. 66

    Why can pooling be inappropriate for a Go-playing network?

    Model answer

    Pooling is not automatically suitable for Go because removing board rows or columns changes the board and may alter the position's meaning.

    Explanation

    Removing rows or columns changes the board's structure and can change the game situation, unlike many image-classification cases.

  67. 67

    Did the described AlphaGo network use pooling?

    Model answer

    No. The described AlphaGo network used convolutional layers without pooling.

    Explanation

    The stated architecture applies convolutions throughout the network and does not reduce the board through pooling.

  68. 68

    What were the main settings of the first convolutional layer in the described AlphaGo architecture?

    Model answer

    The first layer used zero padding, 5imes55 imes55imes5 filters, 192 filters, stride 1, and a ReLU nonlinearity.

    Explanation

    The first layer's specified settings combine a wider local field with many filters and a nonlinearity.

  69. 69

    What convolution settings were used in layers 2 through 12 of the described AlphaGo architecture?

    Model answer

    Layers 2 through 12 used zero padding, 3imes33 imes33imes3 filters, 192 filters per layer, and stride 1.

    Explanation

    The middle layers use smaller kernels while preserving the number of filters and using stride 1.

  70. 70

    How did the described AlphaGo network produce its final move probabilities?

    Model answer

    A Softmax was applied at the end to produce outputs over the possible move locations.

    Explanation

    A classification network converts its final scores into a distribution over possible moves.

  71. 71

    What should designers consider when using CNNs for speech or text rather than images?

    Model answer

    CNNs can be used for speech and text, but receptive-field and parameter-sharing designs should be adapted to the properties of those domains.

    Explanation

    The usefulness of a receptive field and parameter sharing depends on the structure of the data in the target domain.

  72. 72

    Why should an image CNN not simply be applied unchanged to speech or text?

    Model answer

    No. An image CNN should not automatically be assumed to work for speech or text; the architecture must suit the target data's characteristics.

    Explanation

    The architecture's assumptions are not guaranteed to match every task's structure.

  73. 73

    Why may receptive-field design need to differ between image, speech, and text tasks?

    Model answer

    The receptive field should be chosen according to the relevant structure of the data, since the useful local relationships in speech or text differ from those in images.

    Explanation

    A small local field can capture local image patterns, but other data types may have different meaningful relationships.

  74. 74

    What general principle determines whether a CNN architecture is appropriate for a task?

    Model answer

    CNNs have applications beyond images, but whether they work well depends on whether their design assumptions fit the task.

    Explanation

    The fact that CNNs are used in several domains does not mean that one architecture is universally appropriate.

  75. 75

    What limitation can a standard CNN have when an image object is scaled or rotated?

    Model answer

    A CNN may fail to recognize an object after scaling or rotation, even if a person considers the transformed object to have the same shape.

    Explanation

    Standard CNNs do not automatically recognize transformed versions of patterns as equivalent.

  76. 76

    Why might a CNN treat a scaled or rotated object as different from the original object?

    Model answer

    Scaling or rotation changes the image's pixel values or their arrangement, so a CNN may treat the transformed image as different from the original.

    Explanation

    A transformation changes the pixel values and their arrangement, so the network may receive a substantially different input.

  77. 77

    How can data augmentation help a CNN handle changes in object scale and orientation?

    Model answer

    Data augmentation can expose the network to objects at different sizes and orientations during training, improving recognition of those variations.

    Explanation

    Exposure to transformed training examples helps the model learn that such variations can still correspond to the same object class.

  78. 78

    How can image crops be used to augment training data for scale variation?

    Model answer

    Training images can be cropped to a smaller region and enlarged so that the model sees the patterns at different sizes.

    Explanation

    Cropping and enlarging image regions is one way to create examples in which patterns appear at different apparent sizes.

  79. 79

    How can rotated training images help a CNN?

    Model answer

    Rotating training images exposes the CNN to rotated versions of objects, helping it learn to recognize those orientations.

    Explanation

    Rotating training examples gives the network examples of objects in different orientations.

  80. 80

    What architecture is mentioned as a possible approach to handling image scaling and rotation?

    Model answer

    A Spatial Transformer Layer is identified as an architecture that can address the scaling and rotation limitation.

    Explanation

    The content names a separate architecture intended to address transformations, without requiring its internal mechanism here.

1 of 80
Question 1 of 80

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent