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
0 votes
0 answers
20 views

What are the benefits of using multiple convolutions, as opposed to one, before the pooling layer in a U-Net?

I have seen U-Nets that use a single convolution before the pooling operator and some that use two or more. My question is, what is better? Or what are the benefits of using more or less convolutions?
user avatar
0 votes
0 answers
14 views

What happens in tensorflow/pytorch under the hood when doing a convolution2d() with x filters when num input feature maps/channels > x? [duplicate]

I was wondering about what happens in tensorflow/pytorch under the hood when doing a convolution2d() with x filters when num input feature maps/channels > x? e.g. my input shape with 129 feature ...
user avatar
0 votes
0 answers
24 views

Implement 4D convolution as matrix-matrix multiplication - paper is confusing!

I am confused by this paper https://arxiv.org/pdf/1410.0759.pdf which displays on page 4 how to model a 3D convolution (input has more than 1 channel and filter has more than one output). In this ...
user avatar
0 votes
0 answers
13 views

How are CNN kernels trained when using FFT for convolutions?

CNNs (convolutional neural networks) are adept at processing images, as their construction is based on the biological neural networks found in the human eye. "Kernels", sometimes called &...
user avatar
0 votes
0 answers
16 views

How do I compute the convolution of two kernels of the same size in practice?

Suppose I have a 256-by-256 input matrix called $X$ and two 3-by-3 kernels called $K_1$ and $K_2$. By the associativity of convolution \begin{equation} (X \star K_1) \star K_2 = X \star (K_1 \star K_2)...
user avatar
  • 161
2 votes
1 answer
160 views

Is down-sampling the only purpose of using stride?

Stride is used in at least two operations: convolution and pooling. Both operations can be viewed as applying a kernel function on input using a kernel (filter). Stride determines the amount of "...
user avatar
  • 3,099
0 votes
0 answers
34 views

Orthogonalizing Convolutional Layers with the Cayley Transform

I'm reading this paper: "Orthogonalizing Convolutional Layers with the Cayley Transform" regarding the orthogonalization of convolutional layers, i.e. enforcing learning of orthogonal ...
user avatar
1 vote
1 answer
140 views

What is a filter in the context of graph convolutional networks?

In Section 2.1 of the research paper titled Semi-Supervised Classification with Graph Convolutional Networks by Thomas N. Kipf et al., Spectral convolution on graphs defined as The multiplication of ...
user avatar
  • 125
0 votes
1 answer
139 views

In this paper, if region $R_{2}$ moves in a sliding window manner, won't the saliency map have a smaller size than the original image?

In the paper Salient Region Detection and Segmentation, I have a question pertaining to section 3 on the convolution-like operation being performed. I had already asked a few questions about the paper ...
user avatar
2 votes
1 answer
135 views

How do I choose the hyper-parameters for a model to detect different guitar chords?

I need to build a hand detector that recognizes the chord played by a hand on a guitar. I read this article Static Hand Gesture Recognition using Convolutional Neural Network with Data Augmentation ...
user avatar
  • 73
0 votes
2 answers
86 views

Is it possible to apply 2D convolution to 1D data?

Suppose that I have a 1D dataset with 6 features. Can I apply a 2D convolutional neural net to this dataset?
user avatar
1 vote
1 answer
46 views

Why does $I_N + D^{-\frac{1}{2}}AD^{-\frac{1}{2}}$ have eigenvalues in the range [0, 2]?

In Semi-supervised classification with Graph Convolutional Networks, I am unable to understand a few things. Given an undirected graph having adjacency matrix $A$, degree matrix $D_{ii} = \sum_j A_{...
user avatar
1 vote
0 answers
90 views

Couldn't the self-attention mechanism be replaced with a global depth-wise convolution?

The main advantages of the self-attention mechanism are: Ability to capture long-range dependencies Ease to parallelize on GPU or TPU However, I wonder why the same goals cannot be achieved by ...
user avatar
0 votes
2 answers
62 views

Why do we lose detail of an image as we go deeper into a ConvNet?

I was reading this research paper titled 'Image Style Transfer using Convolutional Neural Networks' which as the title suggests was based on Neural Style Transfer. I came across this line which didn't ...
user avatar
1 vote
1 answer
141 views

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 ...
user avatar
0 votes
0 answers
8 views

Dose the input channels of depth-wise convolution must be same with output channels?

Just learned the concept of group convolution and depth-wise convolution, I am confused what the difference between depth-wise and group convolution is. Does the input channels of depth-wise ...
user avatar
  • 53
0 votes
1 answer
48 views

Is a convolutional layer capable of converting, for example, a binary image into an RGBA image?

I am asking this question for a better understanding of the concept of channels in images. I am aware that a convolutional layer generates feature maps from a given image. We can adjust the size of ...
user avatar
  • 3,099
1 vote
0 answers
78 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 ...
user avatar
  • 3,099
1 vote
0 answers
167 views

Is there any gain by lazy initialization of weights, biases and number of input channels for a convolution operation?

The basic layers for performing convolution operations 1,2,3 in PyTorch are ...
user avatar
  • 3,099
1 vote
1 answer
146 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 ...
user avatar
  • 3,099
2 votes
1 answer
335 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 ...
user avatar
  • 3,099
1 vote
1 answer
58 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 ...
user avatar
  • 113
2 votes
1 answer
336 views

Are there any advantages of the local attention against convolutions?

Transformer architectures, based on the self-attention mechanism, have achieved outstanding performance in a variety of applications. The main advantage of this approach is that the given token can ...
user avatar
1 vote
0 answers
18 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 ...
user avatar
  • 183
0 votes
0 answers
80 views

Has positional encoding been used 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 ...
user avatar
2 votes
0 answers
39 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 "...
user avatar
  • 21
1 vote
1 answer
29 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 ...
user avatar
1 vote
0 answers
203 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 187
3 votes
0 answers
48 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. ...
user avatar
  • 187
1 vote
1 answer
39 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. ...
user avatar
  • 3,099
2 votes
1 answer
266 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 (...
user avatar
  • 183
2 votes
1 answer
73 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$ ...
user avatar
3 votes
1 answer
140 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 ...
user avatar
2 votes
0 answers
34 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 ...
user avatar
4 votes
1 answer
145 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: ...
user avatar
  • 663
1 vote
1 answer
89 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 \...
user avatar
0 votes
1 answer
139 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 ...
user avatar
1 vote
0 answers
71 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, ...
user avatar
2 votes
1 answer
792 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 ...
user avatar
  • 174
2 votes
1 answer
223 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 ...
user avatar
  • 153
1 vote
0 answers
45 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). ...
user avatar
1 vote
2 answers
567 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. ...
user avatar
3 votes
0 answers
47 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$ ...
user avatar
1 vote
0 answers
52 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 ...
user avatar
  • 131
2 votes
0 answers
104 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 ...
user avatar
1 vote
0 answers
123 views

Can I think of the graph convolution operation as a regular 2D convolution for 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 ...
user avatar
1 vote
0 answers
45 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. ...
user avatar
  • 520
2 votes
1 answer
134 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 ...
user avatar
1 vote
1 answer
56 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 ...
user avatar