Questions tagged [convolution]

For questions related to the convolution operation in mathematics, convolutional neural networks, image processing and computer vision.

Filter by
Sorted by
Tagged with
1
vote
0answers
29 views

Is there any animation that illustrates the “fold” and “unfold” operations of convolutional layers?

There are fourteen convolution layers in PyTorch. Among them six are related to convolution, another six are related to transposed convolution. The remaining two are fold and unfold operations. The ...
1
vote
1answer
23 views

What does 'input planes' mean in the phrase 'input signal/image composed of several input planes'?

PyTorch documentation provided the following descriptions to the Convolution layers ...
1
vote
0answers
30 views

What does 'channel' mean in the case of an 1D convolution?

While reading about 1D-convolution in PyTorch, I encountered the concept of channels ...
1
vote
1answer
38 views

How is the convolution operation connected to neural networks?

I've been reading up on the convolution operation and neural networks. I understand that the convolution operation is defined as: $$(f * g)(t)=\int_{-\infty}^{\infty} f(\tau) g(t-\tau) d \tau$$ The ...
1
vote
0answers
14 views

More channels vs multiple inputs in neural network

Suppose I want to train the model for playing chess. I found that existing models use as input the grid with dimensions 8x8x20 (so we have 20 channels). Some channels may represent how different kind ...
0
votes
0answers
23 views

Positional encoding in convolutional layers

Positional encoding (PE) is an essential part of the self-attention layers in the transformer architectures since without adding it in some way (fixed of learnable) to the input embeddings model has ...
2
votes
0answers
37 views

How to implement a (3 + 2)-dimensional convolutional layer where the 2d space is “internal”?

I am trying to train a CNN to learn 5D (kind of) data. The data is structured as follows. It has three spatial dimensions [x, y, z], but it also has two "...
1
vote
1answer
25 views

Why the non-exploitation of edge labels in current graph convolutions “results in an overly homogeneous view of local graph neighborhoods”?

I am currently reading a paper called Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs (2017, CPPR), and I cannot understand the following sentence: We identify that the ...
1
vote
0answers
148 views

Convolutional Layer Multichannel Backpropagation Implementation

I have been working on coding a CNN in python from scratch using numpy as a semester project and I think I have successfully implemented it up to backpropagation in the MaxPool Layers. However, my ...
1
vote
1answer
141 views

What is the difference between same convolution and full convolution in terms of feature map size?

In valid convolution, the size of the output shrinks at each layer. So after some point of time additional layers cannot meaningfully performs convolution. For this reason, same convolution is ...
3
votes
0answers
44 views

Why might the convolution be inappropriate when the task involves incorporating information from very distant locations in the input?

When I am reading about convolutional neural networks, I have encountered the following sentence from the textbook(page 341) that says about the limitation of the usage of the convolution in CNNs. ...
0
votes
0answers
23 views

Which layer to route out of layers of same width and height in Yolo implementation?

In Yolo configuration files (like yolo3.cfg in dark-net), there are many layers with output of same height and width due to ...
1
vote
1answer
25 views

What is meant by “real-valued argument” in this context of the convolution operation?

Consider the following statement from Deep Learning book (p. 327, chapter 9: Convolutional Networks) In its most general form, convolution is an operation on two functions of a real-valued argument. ...
2
votes
1answer
77 views

Is it a good idea to use different width and height of the kernel in a CNN?

I always see that the width and height of the kernel are the same. But is it a good idea to use different numbers? Recently I tried to use GoogLeNet (which expects images to be 224x224) on my images (...
2
votes
1answer
66 views

What do the variables in the cross-correlation formula mean?

I understand what cross-correlation does given a kernel and an input image, but the formula confuses me a little. Given here in Goodfellow's Deep Learning (page 329), I can't quite understand what $m$ ...
0
votes
0answers
81 views

Conversion of convolution filter weights between NCHW and NHWC formats

Popular deep learning frameworks have different default data formats (PyTorch with NCHW, TensorFlow with NHWC), which lead to published pretrained models with weights that may have an incompatible ...
3
votes
1answer
78 views

What is the use of the regular convolutional layer in expansion path of U-Net?

I was going through the paper on U-Net. U-net consists of a contracting path followed by an expanding path. Both the paths use a regular convolutional layer. I understand the use of convolutional ...
2
votes
0answers
27 views

Do filters have as many layers as the depth of the input in CNNs? [duplicate]

Firstly as an example here is the architecture of YOLOv2 I am trying to understand the depth of an output of a convolutional layer. For example, the first convolutional layer has the shape 3x3x32. So ...
4
votes
1answer
77 views

Is there anything that ensures that convolutional filters don't end up the same?

I trained a simple model to recognize handwritten numbers from the mnist dataset. Here it is: ...
1
vote
1answer
32 views

Is average pooling equivalent to a strided convolution with a specific constant kernel?

It seems to me that average pooling can be replaced by a strided convolution with a constant kernel. For instance, a 3x3 pooling would be equivalent to a strided convolution (of stride $3$) with a $3 \...
0
votes
1answer
59 views

In CNNs, why do we sum the filter derivatives w.r.t the loss function to get the final gradient?

In a Convolutional Neural Network, unlike the fully connected layers, the same filter is used multiple times on the input while convolving - so during backpropagation, we get multiple derivatives for ...
1
vote
0answers
31 views

Is the 3d convolution associative given that it can be represented as matrix multiplication?

I'm trying to understand if a 3D convolution of the sort performed in a convolutional layer of a CNN is associative. Specifically, is the following true: $$ X \otimes(W \cdot Q)=(X \otimes W) \cdot Q, ...
2
votes
1answer
288 views

When should we use separable convolution?

I was reading the "Deep Learning with Python" by François Chollet. He mentioned separable convolution as following This is equivalent to separating the learning of spatial features and the ...
1
vote
1answer
118 views

How to mathematically describe the convolution operation (with a Gaussian kernel)?

I have to build a model where I pre-process the data with a Gaussian kernel. The data are an $n\times n$ matrix (i.e one channel), but not an image, thus I can't refer to this matrix as an image and ...
1
vote
0answers
37 views

Is it possible to express attention as a Fourier convolution?

Convolutions can be expressed as a matrix-multiplication (see e.g. this post) and as an element-wise multiplication using the Fourier domain (https://en.wikipedia.org/wiki/Convolution_theorem). ...
0
votes
2answers
240 views

How could I convolve a 4D image and a 4D filter with stride?

I want to create a CNN in Python, specifically, only with NumPy, if possible. For optimizing the time of convolution (actually correlation) in the network, I wanna try to use FFT-based convolution. ...
3
votes
0answers
34 views

What does “convolve k filters” mean in the AlphaGo paper?

On page 27 of the DeepMind AlphaGo paper appears the following sentence: The first hidden layer zero pads the input into a $23 \times 23$ image, then convolves $k$ filters of kernel size $5 \times 5$ ...
1
vote
0answers
51 views

Embedding Layer into Convolution Layer

I'm looking to encode PDF documents for deep learning such that an image representation of the PDF refers to word embeddings instead of graphic data So I've indexed a relatively small vocabulary (88 ...
2
votes
0answers
91 views

Why can we perform graph convolution using the standard 2d convolution with $1 \times \Gamma$ kernels?

Recently I was reading this paper Skeleton Based Action RecognitionUsing Spatio Temporal Graph Convolution. In this paper, the authors claim (below equation (\ref{9})) that we can perform graph ...
1
vote
0answers
84 views

Can I think graph convolution as 2D convolution like images?

Kipf et al described in his paper that we can write graph convolution operation like this: $$H_{t+1} = AH_tW_t$$ where, $A$ is the normalized adjacency matrix, $H_t$ is the embedded representation of ...
1
vote
0answers
41 views

Why does the number of channels in the PointNet increase as we go deeper?

For example, in PointNet, you see the 1D convolutions with the following channels 64 -> 128 -> 1024. Why not e.g. ...
2
votes
1answer
93 views

Is it possible to apply the associative property of the convolution operation when it is followed by a non-linearity?

The associative property of multidimensional discrete convolution says that: $$Y=(x \circledast h_1) \circledast h_2=x\circledast(h_1\circledast h_2)$$ where $h_1$ and $h_2$ are the filters and $x$ is ...
1
vote
1answer
47 views

How will the input be preserved as we go deeper in CNN, where dimensions decrease drastically?

Our length of feature representation decreases as we go deeper into the CNN, I mean to say that horizontal and vertical lengths decrease while depth(channels) increase. So, how will the input be ...
3
votes
2answers
376 views

Do convolutional neural networks perform convolution or cross-correlation?

Typically, people say that convolutional neural networks (CNN) perform the convolution operation, hence their name. However, some people have also said that a CNN actually performs the cross-...
1
vote
0answers
32 views

Is there a difference between using 1d conv layers and 2d conv layers with kernel with size of 1 along other than time dimension?

Let's assume I use convolutional networks for time-series prediction. Data I feed to the network have 1 channel depth, height of number of periods and number of features is the width, so the frame ...
1
vote
0answers
58 views

How do we choose the filters for the convolutional layer of a convolution neural network?

Since the hidden layers of a CNN work as a trainable feature extractor, more detailed content based on a larger number of pixels shall require bigger filter sizes. But for cases where localized ...
1
vote
1answer
99 views

Are activation functions applied to feature maps?

If I have a convolutional neural network, and I convolve my input tensor with a kernel, the output is a feature map. Is an activation function then applied to this feature map? If its an image that ...
7
votes
1answer
179 views

What is the point of using 1D and 2D convolutions with a kernel size of 1 and 1x1 respectively?

I understand the gist of what convolutional neural networks do and what they are used for, but I still wrestle a bit with how they function on a conceptual level. For example, I get that filters with ...
3
votes
1answer
76 views

How is the convolution layer is usually implemented in practice?

Following an earlier question, I'm interested in understanding the basics of Conv2d and especially how the kernel is applied, summed, and the propagated. I ...
4
votes
2answers
4k views

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 ...
2
votes
1answer
54 views

Is it a sign of overfitting when validation_loss dips and then goes up with increasingly bigger swings?

I am experimenting with a ConvNet to categorize images taken with a depth camera. So far I have 4 sets of 15 images each. So 4 labels. The original images are 680x880 16-bit grayscale. They are scaled ...
4
votes
2answers
119 views

Is there any difference between the convolution operation applied to images and applied to other numerical 2D data?

Is there any difference between the convolution operation applied to images and applied to other numerical 2D data? For example, we have a pretty good CNN model trained on a number of $64 \times 64$ ...
1
vote
0answers
129 views

What's the difference in using multiple convolutional layers and no pooling versus using a single convolutional layer and a single max pooling layer?

I'm currently working on a college project in which I'm designing a Deep Q-Network that takes images/frames as an input. I've been searching online to see how other people have designed their ...
1
vote
1answer
142 views

How do I optimize the number of filters in a convolution layer?

I’m trying to figure out how to write an optimal convolutional neural network with respect to maximizing and minimizing filters in a convolution 2D layer. This is my thinking and I’m not sure if it's ...
4
votes
2answers
1k views

When is max pooling exactly applied in convolutional neural networks?

When using convolutional networks on images with multiple channels, do we max pool after we sum the feature map from each channel, or do we max pool each feature map separately and then sum? What's ...
2
votes
1answer
159 views

How is the depth of filters of hidden 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 ...
1
vote
1answer
163 views

How can I make the kernels non-learnable and set them manually?

I'm a newbie in Convolutional Neural Networks. I have found out that kernels in convolutional layers are usually learned while training. Suppose I have a kernel that is very good to extract the ...
6
votes
3answers
2k views

Convolutional Neural Network: 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 ...
2
votes
1answer
464 views

Can I shuffle image channel data as a form of data augmentation?

If I want to augment my dataset, is shuffling or permuting the channels (RGB) of an image a sensible augmentation for training a CNN? IIRC, the way convolutions work is that a kernel operates over ...
4
votes
2answers
287 views

Can CNNs be applied to non-image data, given that the convolution and pooling operations are mainly applied to imagery?

When using CNNs for non-image (times series) data prediction, what are some constraints or things to look out for as compared to image data? To be more precise, I notice there are different types of ...