Skip to main content
6 votes
Accepted

How to calculate the number of parameters of a convolutional layer?

What are the parameters in a convolutional layer? The (learnable) parameters of a convolutional layer are the elements of the kernels (or filters) and biases (if you decide to have them). There are ...
nbro's user avatar
  • 40.9k
5 votes
Accepted

How can 3 same size CNN layers in different ordering output different receptive field from the input layer?

It is really easy to visualize the growth in the receptive field of the input as you go deep into the CNN layers if you consider a small example. Let's take a simple example: The dimensions are in the ...
Ayushi Agarwal's user avatar
4 votes

Does each filter in each convolution layer create a new image?

For a 3 channel image (RGB), each filter in a convolutional layer computes a feature map which is essentially a single channel image. Typically, 2D convolutional filters are used for multichannel ...
tynowell's user avatar
  • 156
4 votes
Accepted

Does each filter in each convolution layer create a new image?

You are partially correct. On CNNs the output shape per layer is defined by the amount of filters used, and the application of the filters (dilation, stride, padding, etc.). CNNs shapes In your ...
adn's user avatar
  • 156
4 votes

Does each filter in each convolution layer create a new image?

About the images inside the CNN layers: I really recommend this article since there is no one short answer to this question and it probably will be better to experiment with it. About the RGB input ...
Sahar Sela's user avatar
3 votes
Accepted

How is the depth of the input related to the depth of the output of a convolutional layer?

The reason why you go from 16 to 3 channels is that, in a 2d convolution, filters span the entire depth of the input. Therefore, your filters would actually be $7 \times 7 \times 16$ in order to cover ...
cantordust's user avatar
3 votes

How can 3 same size CNN layers in different ordering output different receptive field from the input layer?

The problem is in your diagram. Here are the steps to get to a 5x5 receptive field. Here is your diagram, redone slightly: Notice that the new unit takes a weighted sum of the 9 pixels in the input, ...
Gary Cottrell's user avatar
3 votes
Accepted

Neural Nets: CNN confirming layer/filter arithmetic

Your first point is correct. The filters are stored in 4d arrays, with dimensions of (height, width, input channels, filter number) . The order may differ. Your second point is correct too. The ...
Clement's user avatar
  • 1,745
3 votes
Accepted

How is the depth of a convolutional layer determined?

The $96$ is the number of feature maps, which is equal to the number of filters/kernels. The choice of the number of kernels is not fully arbitrary, although there is no equation or exact rule ...
daniel451's user avatar
  • 266
3 votes

How to calculate the number of parameters of a convolutional layer?

For a standard convolution layer, the weight matrix will have a shape of (out_channels, in_channels, kernel_sizes). In addition, you will need a vector of shape <...
razvanc92's user avatar
  • 1,148
2 votes
Accepted

How to compute the number of weights of a CNN?

Calculating the number of parameters in a CNN is very straightforward. A CNN is composed of different filters, which are essentially 3d tensors. CNN weights are shared, meaning they are used multiple ...
Clement's user avatar
  • 1,745
2 votes

How is the depth of a convolutional layer determined?

Let's say you have an image with $3$ channels and you have $10$ filters, where each filter has the shape $5 \times 5 \times 3$. The depth of the convolutional layer after having applied this filter to ...
GPrathap's user avatar
  • 121
1 vote
Accepted

2D convolution with channels versus 3D convolution for layers of a map?

First of all, I don't think that the two approaches are the same as @lev1248 claims. When using a 3D convolution the 3d filters have depth equal to kernel_size and ...
pi-tau's user avatar
  • 815
1 vote

How do you pass from the 192 depth in the first tensor to the 256 in the second tensor?

I suppose that 3x3x192 in Conv. Layer refers to "Kernel" size - you may think of it as a "scanner" that scans through an input tensor. This ...
Jakub Podolak's user avatar
1 vote
Accepted

Are the output dimensions of the first and second convolutional layer in YOLO paper correct?

In any case anyone is struggling with the same problem. It seems that they were simply typos in the original paper. I have downloaded the author's framework Darknet, as well as the configuration and ...
ldemaeztu's user avatar
1 vote
Accepted

Why do we add 1 in the formula to calculate the shape of the output of the convolution?

In a few words, we add $1$ to account for the initial position of the kernel. You can easily see this if you let $s = 1$ (unit stride) and $p = 0$ (i.e. no padding), so your formula simplifies to \...
nbro's user avatar
  • 40.9k
1 vote
Accepted

How is the depth of the filters of convolutional layers determined?

Does the next convolutional filter have a depth of 40? So, would the filter dimensions be 3x3x40? Yes. The depth of the next layer $l$ (which corresponds to the number of feature maps) will be 40. If ...
nbro's user avatar
  • 40.9k
1 vote

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$?

The padding is not size zero* in the inception CNN layers. In fact it is deliberately chosen to pad so that the convolution by itself would produce an image the same size as the original. I.e. $p=(f−1)...
Neil Slater's user avatar
  • 32.7k
1 vote

How is the depth of a convolutional layer determined?

Given that you were also asking for a reference that describes in detail these operations, you should take a look at the paper A guide to convolution arithmetic for deep learning (2018), which ...
nbro's user avatar
  • 40.9k

Only top scored, non community-wiki answers of a minimum length are eligible