Convolutional Neural Networks
- 82Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What does CNN stand for, and what kind of task is it commonly used for?
A Convolutional Neural Network (CNN) is a network architecture commonly designed for image-processing tasks, especially image classification.
Or swipe the card
82 cards
What does CNN stand for, and what kind of task is it commonly used for?
A Convolutional Neural Network (CNN) is a network architecture commonly designed for image-processing tasks, especially image classification.
What is the goal of image classification?
The model receives an image and predicts which object or class it contains.
How are images of different sizes commonly prepared for an image-recognition model?
Many image-recognition systems assume a fixed input size. Images of different dimensions are commonly resized to a standard size before being input.
How does a one-hot vector represent the correct class in a classification task?
A one-hot vector has a 1 in the dimension for the correct class and 0s in all other dimensions.
What determines the length of a classification model's one-hot label vector?
The vector's length equals the number of classes the model can distinguish.
What does the length of a one-hot label vector imply about a model's classification capacity?
A vector of length 2000 represents 2000 possible classes. Strong image-recognition systems may classify over 1000 categories, or even tens of thousands.
How is a digital image represented as a tensor?
A color image is represented as a three-dimensional tensor: height, width, and number of channels.
What do the channels and values in an RGB image represent?
For a standard color image, the channels represent red, green, and blue. Each channel value records a color intensity at a pixel.
What does flattening an image tensor do, and what is the resulting vector length for a 100×100 RGB image?
Flattening arranges all pixel-channel values into one vector. A 100×100 RGB image yields a vector of length 100×100×3.
How can detecting visual patterns help a network recognize an object such as a bird?
A neuron may detect a meaningful local pattern, such as a beak, an eye, or a claw, and the combination of such patterns can help identify an object.
Why might an image-recognition neuron not need to examine the whole image?
Many useful image patterns occupy only a small region, so detecting them does not necessarily require giving a neuron the entire image.
What is a receptive field in a CNN?
A receptive field is the region of an image whose values are considered by a particular neuron.
How many input weights are needed for a neuron whose receptive field is 3×3×3?
A receptive field of size 3×3×3 contains 27 values. A neuron uses one weight per value, plus a bias.
Can receptive fields overlap?
Yes. Different neurons can examine overlapping image regions.
Can multiple neurons be assigned to the same receptive field, and why?
Yes. Multiple neurons can examine the same receptive field, allowing different neurons to detect different patterns in that region.
Can receptive fields have different sizes, and why might that be useful?
Yes. A small pattern might fit within a 3×3 region, while a larger one might require a region such as 11×11.
Can a receptive field be restricted to only some image channels?
Yes. A neuron can be designed to examine only selected channels, although standard image CNNs commonly use all channels.
Must a receptive field be square?
Yes. A receptive field can be rectangular; its shape is a design choice based on the task.
Why are standard receptive fields usually contiguous rather than covering separated image regions?
They can be designed to be disconnected, but this is usually only useful if the task has patterns that depend on separated image regions. Ordinary visual patterns are typically local and contiguous.
What does kernel size describe, and what sizes are common in image CNNs?
When all channels are considered, kernel size refers to the receptive field's height and width. A 3×3 kernel is common; sizes such as 7×7 or 9×9 are relatively large.
How many neurons might commonly be assigned to one receptive field?
A receptive field is commonly handled by a group of neurons, such as 64 or 128, so that the group can detect different patterns in that region.
What does stride mean in a convolutional layer?
Stride is the distance the receptive field moves between neighboring positions as it scans an image.
What stride values are commonly used when scanning an image?
Stride is commonly set to 1 or 2, rather than a large value.
Why are overlapping receptive fields useful?
Overlapping fields reduce the chance that a pattern near the boundary between fields will be missed by every neuron.
What can go wrong if neighboring receptive fields do not overlap?
If receptive fields do not overlap, a pattern located at their boundary may not fall inside any field, so it could go undetected.
How are receptive fields positioned to scan an entire image?
Receptive fields are shifted across the image horizontally and vertically so that locations throughout the image are examined.
What is padding, and what is zero padding?
Padding supplies values for portions of a receptive field that extend beyond the image boundary. Zero padding supplies zeros.
Must padding use zeros?
Yes. For example, a method could fill out-of-bounds positions using the image's average value or values copied from its edges.
Why is parameter sharing useful when the same pattern can appear in different image regions?
It lets neurons detect the same pattern at different image locations without learning a separate set of weights for every location.
Do neurons with shared weights necessarily produce the same output?
No. They can receive different image values, so applying the same weights to different inputs can produce different outputs.
What happens when two neurons share parameters and also receive identical inputs?
If two neurons examine the same inputs and have the same weights and bias, their outputs will be the same.
How are parameters commonly shared among groups of neurons at different receptive-field locations?
In a common design, corresponding neurons at different spatial locations share weights: the first neuron shares with the first, the second with the second, and so on.
What is a filter in a CNN?
Each shared set of weights is called a filter. Different filters can detect different patterns.
What is the shape of a convolutional filter for an input with C channels?
A filter spans the input's spatial kernel dimensions and all of its channels. For example, its shape may be 3×3×C, where C is the channel count.
How does the number of input channels affect a filter's depth?
A grayscale image typically has one channel, while an RGB image has three. A filter's depth matches the input channel count.
What are the values inside a convolutional filter, and how are they obtained?
The filter's values are model parameters learned from data.
How does a filter compute an output at one image location?
At each position, the filter values are multiplied by the corresponding image values and summed—the inner product—to produce an output value.
What spatial output size results from applying a 3×3 filter with stride 1 to a 6×6 image without padding?
With no padding and stride 1, a 3×3 filter placed on a 6×6 image produces a 4×4 output for that filter.
How can a filter's output indicate that its target pattern occurs in an image?
A filter that matches a pattern produces a stronger response where that pattern occurs. For example, a filter with matching diagonal weights can respond strongly to an image region with that diagonal pattern.
What is a feature map?
Each filter produces a set of spatial output values called a feature map.
What is the relationship between the number of filters and the output channels?
A layer with 64 filters produces 64 feature maps. If each map is 4×4, its output can be viewed as a 4×4 representation with 64 channels.
How can a convolutional layer's output be interpreted?
The output feature maps can be treated as a new image-like tensor whose channels correspond to the filters in the preceding layer.
What determines the depth of filters in a convolutional layer after a layer with 64 filters?
If the preceding layer has 64 filters, its output has 64 channels, so each filter in the next layer has depth 64.
What original-image region can a second 3×3 convolutional layer consider?
Although each layer's kernel is 3×3, a second-layer output can depend on a 5×5 region of the original image.
How does stacking convolutional layers affect the region of the original image that later units can use?
As more convolutional layers are stacked, later units can depend on increasingly large regions of the original image.
Do convolutional filters typically have a bias term?
Yes. CNN filters can have biases in addition to their weights.
Why is a layer using filters that scan across an image called a convolutional layer?
The shared filter is applied across image locations; this sliding operation is called convolution.
How many weights connect a 100×100 RGB image vector to a fully connected first layer with 1000 neurons?
The first layer has 1000×100×100×3 weights, which equals 30,000,000 or 3×107.
What is one benefit and one risk of increasing a model's number of parameters?
More parameters can increase a model's flexibility and capacity, but also increase its risk of overfitting.
How does using receptive fields constrain a network compared with a fully connected layer?
It restricts each neuron to a local image region instead of allowing it to use every input dimension.
How does parameter sharing further restrict a network's flexibility?
It forces designated neurons to use identical weights, rather than allowing each neuron to learn an entirely independent set.
What two design ideas define a convolutional layer in this account?
A convolutional layer combines local receptive fields with parameter sharing.
What built-in assumption makes a CNN more biased toward image tasks?
It has a stronger built-in assumption, or bias, about the task than a fully connected layer: that useful patterns are local and can recur across image locations.
Is a model's larger inductive bias necessarily a disadvantage?
Not necessarily. The constraints can help on images by matching their structure and reducing overfitting risk, even though they reduce general flexibility.
What should be considered before using an image-oriented CNN for a different task?
Check whether the task shares the relevant properties, such as useful local patterns that may occur in different locations. Image-specific assumptions may not suit other tasks.
What does the image-subsampling example illustrate about reducing image size?
Removing half the rows and half the columns leaves one quarter of the original positions. The example illustrates that an image may become smaller while its broad object identity remains recognizable.
How does pooling differ from a trainable convolutional layer?
Pooling has no learned weights or parameters; it applies a fixed operation. It is therefore sometimes compared to an activation function rather than a trainable layer.
How does max pooling summarize each group of values?
Max pooling divides values into groups and returns the largest value from each group.
What does max pooling do to each 2×2 group?
A 2×2 region is divided into a group, and its maximum value is selected as the representative for max pooling.
Can pooling use alternatives to a 2×2 maximum?
Yes. Pooling can use other summary operations, such as an average or geometric mean, and the grouping size can be chosen, such as 3×3 or 4×4.
What happens to spatial dimensions and channel count during pooling?
It reduces the image's spatial dimensions while leaving the number of channels unchanged.
What happens to a 4×4 feature map under 2×2 pooling?
With 2×2 pooling, a 4×4 feature map becomes 2×2, while its channel count remains the same.
How are convolution and pooling commonly arranged in an image-recognition network?
A common arrangement uses several convolutional operations followed by pooling, and repeats this pattern.
What is the computational benefit of pooling, and what is one possible cost?
Pooling reduces spatial size and computation, but subsampling can remove fine details needed for a task and may hurt performance.
Why might a network use full convolution without pooling?
Some modern networks omit pooling and use convolutions throughout, particularly when available computing resources can support the larger representations.
How does a classic CNN commonly turn its final feature maps into classification results?
The feature maps are flattened into a vector, passed through fully connected layers, and commonly followed by a softmax to produce class predictions.
How can a Go board be encoded as a vector using one value per board position?
One possible encoding uses a 19×19 vector: black stones are 1, white stones are −1, and empty points are 0.
Is the encoding 1 for black, −1 for white, and 0 for empty the only way to represent a Go board?
No. The values are one possible representation; other encodings can also describe the board position.
How many classes are there when each point on a 19×19 Go board is treated as a possible next move?
There are 19×19=361 possible board positions, so choosing the next move can be framed as a classification problem with 361 classes.
How can a Go board be interpreted as an image for a CNN?
It can be treated as a 19×19 image, with each pixel corresponding to a board position.
How many channels did the described AlphaGo input use, and what kind of information could they represent?
The described AlphaGo representation uses 48 values, or channels, per board position. These encode features such as whether a location is threatened with capture and nearby stone information.
What property of Go makes local receptive fields useful?
Go has important local patterns, such as stones being surrounded or threatened with capture, that can often be understood from a limited neighborhood.
What property of Go patterns makes parameter sharing useful?
A pattern such as a capture threat can occur in many different board locations, making shared filters useful for detecting it across the board.
What kernel size was used in AlphaGo's first convolutional layer, and what design idea does it illustrate?
Its first convolutional layer uses a 5×5 kernel, reflecting the choice to detect relevant Go patterns in a larger local region.
What are the described first-layer settings in AlphaGo's network?
The described architecture uses zero padding, 192 filters, stride 1, and a ReLU activation in the first layer. The account notes that 192 performed better than tested alternatives of 128 and 256 filters.
What convolution settings are described for AlphaGo's layers 2 through 12?
Layers 2 through 12 use zero padding, 3×3 kernels, 192 filters per layer, and stride 1.
What output operation is used at the end of the described AlphaGo classification network?
The described classification network ends with a softmax output.
Did the described AlphaGo network use pooling, and why is pooling potentially unsuitable for Go?
The described AlphaGo network has no pooling layers. Removing rows or columns could alter the precise board layout and game state.
What should be considered when adapting CNN design from images to speech or text?
Convolutional ideas can also be used for speech and text, but receptive fields and parameter-sharing schemes should be designed for those modalities' properties rather than copied directly from image CNNs.
What limitation can a CNN have with scaled or rotated objects?
A CNN trained on objects at one scale or orientation may fail when those objects are enlarged, reduced, or rotated; such transformations can change the input values the network encounters.
How can data augmentation help address a CNN's sensitivity to scale and rotation?
Training images can be augmented with crops, scaling, and rotations so the model encounters objects at varied sizes and orientations.
What network component is mentioned as an approach to handling spatial transformations?
A Spatial Transformer Layer is an architectural approach mentioned for addressing spatial transformations such as scaling or rotation.

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