DL-05a - Convolutional neural network Flashcards
DL-05a - Convolutional neural network
How do you perform convolution on discrete data?
Slide a filter (kernel) over the input data matrix, applying element-wise multiplication, and sum the results to create a new output matrix.
DL-05a - Convolutional neural network
Describe how to perform convolution for 1 output element.
(See image)
DL-05a - Convolutional neural network
Describe what comes out of after one pass. (See image)
A WxHx1 tensor (1 channel) at a time. Can have multiple output channels.
DL-05a - Convolutional neural network
What is padding?
The process of adding extra pixels or data around the input image or feature map to maintain the spatial dimensions during convolution.
DL-05a - Convolutional neural network
What is stride?
The number of units by which the filter slides over the input during the convolution process. I.e. jumping factor.
DL-05a - Convolutional neural network
Why are fully connected layers not sufficient for image data?
When flattening the image, you lose information about spatial correlation (adjacency information).
DL-05a - Convolutional neural network
Why is the number of parameters in a CNN lower than in a fully connected network?
The number of parameters in a CNN is lower because it uses shared weights and local connectivity, reducing redundancy and computational complexity.
DL-05a - Convolutional neural network
How many parameters are in a convolutional layer?
n(wh*ch) + n
w, h = x size
ch = number of channels
W = Kernel of size w * h * ch
b = bias term
Use n kernels per input, add n biases -> n(Wx + b) -> n((wh) + 1) -> nw*h + n
(See image)
DL-05a - Convolutional neural network
Is a smaller or larger kernel preferred?
Depends.
- Large captures global features
- Small captures local features
DL-05a - Convolutional neural network
What kernel size captures global features?
Large kernels.
DL-05a - Convolutional neural network
What kernel size captures local features?
Small kernels.
DL-05a - Convolutional neural network
What does the pooling layer do? (3)
- Downsample spatial dimensions.
- Reduces number of params
- Helps control overfitting
DL-05a - Convolutional neural network
What are the common pooling layer types? (2)
- Max pooling
- Average pooling
DL-05a - Convolutional neural network
Is average or max pooling better?
Max pooling has been shown to work better in practice.
DL-05a - Convolutional neural network
What is an alternative to pooling?
Using conv layers with stride >1.