For questions related to the arithmetic of convolution operations (1d, 2d, 3d convolutions, transposed, etc.) in the context of convolutional neural networks.
Questions tagged [convolution-arithmetic]
13 questions
8
votes
3 answers
How can 3 same size CNN layers in different ordering output different receptive field from the input layer?
Below is a quote from CS231n:
Prefer a stack of small filter CONV to one large receptive field CONV layer. Suppose that you stack three 3x3 CONV layers on top of each other (with non-linearities in between, of course). In this arrangement, each…

Inkplay_
- 411
- 4
- 8
7
votes
3 answers
Does each filter in each convolution layer create a new image?
Say I have a CNN with this structure:
input = 1 image (say, 30x30 RGB pixels)
first convolution layer = 10 5x5 convolution filters
second convolution layer = 5 3x3 convolution filters
one dense layer with 1 output
So a graph of the network will…

RocketNuts
- 205
- 2
- 6
6
votes
2 answers
How to calculate the number of parameters of a convolutional layer?
I was recently asked at an interview to calculate the number of parameters for a convolutional layer. I am deeply ashamed to admit I didn't know how to do that, even though I've been working and using CNN for years now.
Given a convolutional layer…

Ælex
- 195
- 1
- 7
4
votes
2 answers
How is the depth of the input related to the depth of the output of a convolutional layer?
Let's suppose I have an image with 16 channels that goes to a convolutional layer, which has 3 trainable $7 \times 7$ filters, so the output of this layer has depth 3.
How does the convolutional layer go from 16 to 3 channels? What mathematical…

Du Bois Eloi
- 43
- 4
3
votes
3 answers
How is the depth of a convolutional layer determined?
I am looking at a diagram of ZFNet below, in an attempt to understand how CNNs are designed.
In the first layer, I understand the depth of 3 (224x224x3) is the number of color channels in the image.
In the second layer, I understand the $110 \times…

OnNIX
- 133
- 1
- 3
3
votes
1 answer
Neural Nets: CNN confirming layer/filter arithmetic
I was hoping someone could just confirm some intuition about how convolutions
work in convolutional neural networks. I have seen all of the tutorials on
applying convolutional filters on an image, but most of those tutorials
focus on one channel…

krishnab
- 197
- 7
2
votes
1 answer
Why do we add 1 in the formula to calculate the shape of the output of the convolution?
In the formula to calculate output shape of tensor after convolution operation
$$
W_2 = (W_1-F+2P)/S + 1,
$$
where:
$W_2$ is the output shape of the tensor
$W_1$ is the input shape
$F$ is the filter size
$P$ is the padding
$S$ is the stride.
Why…

adityagabbar
- 23
- 4
2
votes
1 answer
How to compute the number of weights of a CNN?
How can we theoretically compute the number of weights considering a convolutional neural network that is used to classify images into two classes:
INPUT: 100x100 gray-scale images.
LAYER 1: Convolutional layer with 60 7x7 convolutional filters…

estamos
- 157
- 1
- 12
1
vote
1 answer
How is the depth of the filters of convolutional layers determined?
I am a bit confused about the depth of the convolutional filters in a CNN.
At layer 1, there are usually about 40 3x3x3 filters. Each of these filters outputs a 2d array, so the total output of the first layer is 40 2d arrays.
Does the next…

FourierFlux
- 783
- 1
- 4
- 14
0
votes
1 answer
In the inception neural network, how is an image of shape $224 \times 224 \times 3$ converted into one of shape $112 \times 112 \times 64$?
According to the original paper on page 4, $224 \times 224 \times 3$ image is reduced to $112 \times 112 \times 64$ using a filter $7 \times 7$ and stride $2$ after convolution.
$n \times n = 224 \times 224$
$f \times f = 7 \times 7$
stride: $s =…

Santhosh Dhaipule Chandrakanth
- 257
- 1
- 2
- 7
0
votes
3 answers
2D convolution with channels versus 3D convolution for layers of a map?
Introduction
I am considering to use a convolutional neural network in implementing Monte Carlo control with function approximation. I am using a Monte Carlo estimate as it is unbiased and has nice convergence properties. Of course, it has high…

Dylan Solms
- 103
- 2
0
votes
1 answer
How do you pass from the 192 depth in the first tensor to the 256 in the second tensor?
I thought 112x112x192 depth tensor convoluted with 3x3x192 would give 56x56x(192x192)
But this is different. How do you pass from the 192 depth in the first tensor to the 256 in the second tensor?

Mah Neh
- 79
- 1
- 6
0
votes
1 answer
Are the output dimensions of the first and second convolutional layer in YOLO paper correct?
I was reading the last version of the YOLO paper available in Arxiv, and I don't fully understand the output dimensions (I understand width and height, but not depth) of the first and second convolutional layers.
Shouldn't the output of the first…

ldemaeztu
- 11
- 3