Questions tagged [convolution]

A mathematical operation that combines two signals to generate a third signal. Convolution often arises in audio processing (e.g., filtering, reverb) and image processing (e.g., blurring, edge detection).

Convolution takes two signals and combines them to generate a third signal. For 1-D signals, the operation can be thought of as sliding the time-reverse of one signal along the other, and at each time step, taking the integral of the product of the signals (see wikipedia). The convolution operation describes the response of linear time-invariant systems to common input signals. Therefore, it commonly occurs in digital signal processing (DSP) contexts. Audio and image processing are two very common application areas for convolution.

A simple implementation for convolving two discrete time signals requires M*N multiply-add operations, where M and N are the lengths of the two signals. However, by taking advantage of the fact that convolution in the time domain is equivalent to multiplication in the frequency domain, and that transforming between domains can be implemented with O(N*log N) operations, convolution can be sped up. See here for more details.


Related tags

2052 questions
30
votes
2 answers

Defining model in keras (include_top = True)

Can somebody tell me what include_top= True means when defining a model in keras? I read the meaning of this line in Keras Documentation. It says include_top: whether to include the fully-connected layer at the top of the network. I am still looking…
AKSHAYAA VAIDYANATHAN
  • 2,715
  • 7
  • 30
  • 51
30
votes
3 answers

Convolutional Neural Networks - Multiple Channels

How is the convolution operation carried out when multiple channels are present at the input layer? (e.g. RGB) After doing some reading on the architecture/implementation of a CNN I understand that each neuron in a feature map references NxM pixels…
27
votes
5 answers

Convolution along one axis only

I have two 2-D arrays with the same first axis dimensions. In python, I would like to convolve the two matrices along the second axis only. I would like to get C below without computing the convolution along the first axis as well. import numpy as…
Paul
  • 1,720
  • 2
  • 15
  • 20
26
votes
2 answers

What is the difference between performing upsampling together with strided transpose convolution and transpose convolution with stride 1 only?

I noticed in a number of places that people use something like this, usually in fully convolutional networks, autoencoders, and similar: model.add(UpSampling2D(size=(2,2))) model.add(Conv2DTranspose(kernel_size=k, padding='same', strides=(1,1)) I…
26
votes
2 answers

What are the downsides of convolution by FFT compared to realspace convolution?

So I am aware that a convolution by FFT has a lower computational complexity than a convolution in real space. But what are the downsides of an FFT convolution? Does the kernel size always have to match the image size, or are there functions that…
ABDreverhaven
  • 539
  • 1
  • 5
  • 10
24
votes
1 answer

Difference between Conv2D and Convolution2D in Keras

There is already an answer wrt to Tensorflow. But the problem is that In my IDE Conv2D is a class while Convolution2D is a variable?
24
votes
2 answers

For what reason Convolution 1x1 is used in deep neural networks?

I'm looking at InceptionV3 (GoogLeNet) architecture and cannot understand why do we need conv1x1 layers? I know how convolution works, but I see a profit with patch size > 1.
24
votes
2 answers

Simple GLSL convolution shader is atrociously slow

I'm trying to implement a 2D outline shader in OpenGL ES2.0 for iOS. It is insanely slow. As in 5fps slow. I've tracked it down to the texture2D() calls. However, without those any convolution shader is undoable. I've tried using lowp instead of…
user1137704
  • 349
  • 1
  • 3
  • 12
22
votes
1 answer

How to design deep convolutional neural networks?

As I understand it, all CNNs are quite similar. They all have a convolutional layers followed by pooling and relu layers. Some have specialised layers like FlowNet and Segnet. My doubt is how should we decide how many layers to use and how do we set…
22
votes
11 answers

2d convolution using python and numpy

I am trying to perform a 2d convolution in python using numpy I have a 2d array as follows with kernel H_r for the rows and H_c for the columns data = np.zeros((nr, nc), dtype=np.float32) #fill array with some data here then convolve for r in…
mikip
  • 1,677
  • 6
  • 25
  • 35
21
votes
2 answers

How can I determine if my convolution is separable?

What makes a convolution kernel separable? How would I be able to tell what those separable parts were in order to do two 1D convolutions instead of a 2D convolution> Thanks
Derek
  • 11,715
  • 32
  • 127
  • 228
21
votes
3 answers

Convolution Vs Correlation

Can anyone explain me the similarities and differences, of the Correlation and Convolution ? Please explain the intuition behind that, not the mathematical equation(i.e, flipping the kernel/impulse).. Application examples in the image processing…
20
votes
4 answers

What is the difference between filter and conv in Matlab?

I am trying to calculate the output of a LTI system. I came across two different Matlab functions that are supposed to be appropriate for the job: filter and conv. What is the difference between the two of them?
nikos
  • 2,893
  • 11
  • 30
  • 39
20
votes
2 answers

Hyperparameter Tuning of Tensorflow Model

I've used Scikit-learn's GridSearchCV before to optimize the hyperparameters of my models, but just wondering if a similar tool exists to optimize hyperparameters for Tensorflow (for instance number of epochs, learning rate, sliding window size…
mamafoku
  • 1,049
  • 2
  • 14
  • 28
19
votes
2 answers

How to find wrong prediction cases in test set (CNNs using Keras)

I'm using MNIST example with 60000 training image and 10000 testing image. How do I find which of the 10000 testing image that has an incorrect classification/prediction?
user3796320
  • 327
  • 1
  • 2
  • 9