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
0
votes
1 answer

Performance of SpatialConvolution implementation in tensorflow

I realized a SpatialConvolution function by referring the implementation of tensorflow (use eigen). The implementation in tensorflow is located at SpatialConvolution and I also find one related reply about the implementation :…
Shuai
  • 21
  • 6
0
votes
1 answer

Convolutional Neural Networks - Theory

I am sorry for asking this stupid question, but after a bit thinking, I still don't get it yet: According to Jordi Torres (see here), if we look at an image with 28x28 = 784 pixels, then one way to implement this is to let one neuron of a hidden…
user11978420
0
votes
1 answer

MATLAB | f=@(x) function handle with range + conv

I have these functions with the code that aims to plot the two signals - x(t) and h(t) - alongside their time range then find the convolution of the two signals. x=@(t)…
A10AIO
  • 3
  • 1
0
votes
1 answer

Optimization of the algorithm when working with images in C (image convolution)

I need to write a program that will read an image into an array, perform a convolution operation (sharpening) and save it back to a file (ppm). I wrote a standard algorithm: unsigned char* imgBefore = malloc(height*(3*width)*sizeof(unsigned…
0
votes
1 answer

CNN AlexNet convolution layer

Correct me if I was wrong; the input image's dimension is 227x227x3 so after the first convolution layer the output dimension will be 55x55x(3x96)=55x55x288 not 55x55x96. See image bellow:
0
votes
1 answer

Colab throws errors when attempting to apply a SeparableConv2D layer in Tensorflow 2.0

While learning Tensorflow 2.0 and experimenting with various structures I came across SeparableConv2D. I attempted to re-create a simple stack of VGG blocks that used the separable layers instead of standard convolutional layers, but Colab throws…
0
votes
0 answers

Using FFT-Convolution when stride>1

The Fourier transform of the convolution (with stride 1) of two images is equivalent to point-wise multiplication of their individual Fourier transforms. I need to perform stride-'n' convolution using the above FFT-based convolution. For some…
psj
  • 356
  • 3
  • 18
0
votes
0 answers

Java Convolution (Array Out Of Index Error)

i am writing a program that will read the element in a convolute and the program will then multiple each element in the convolute with the kernel given. I will need to take the convolute array from other class as well as kernel. But i am getting…
0
votes
0 answers

How would I use SSE to make sparse float matrix convolution faster?

I have been given this piece of C code as part of an assignment. My task is to use OpenMP and Intel SSE to make it run faster. I understand the logic behind SSE and OpenMP however I cannot wrap my head around on what my approach should do. I have…
0
votes
0 answers

How numpy.convlove of one dimensional works?

I'm trying to understand how numpy.convolve of two one dimensional arrays works ? >>> np.convolve([1, 2, 3], [0, 1, 0.5]) array([0. , 1. , 2.5, 4. , 1.5]) >>> np.convolve([1,2,3],[0,1,0.5], 'same') array([1. , 2.5, 4. ]) >>>…
deepinside
  • 351
  • 1
  • 5
  • 15
0
votes
1 answer

Different Multi-dimension concat in TensorFlow

I need to concat these tensors in the dimensions 2 and 3: [, , ] I know that in the space…
0
votes
2 answers

Different results from PyTorch's conv1d and SciPy's convolve

I'm building a PyTorch model to estimate Impuse Responses. Currently I am calculating the loss from the real and estimated impulse response. I would like to convolve both the estimated and real impulse response with a signal and then calculate the…
jontypreston
  • 398
  • 2
  • 7
0
votes
0 answers

Define a network in pytorch with incomplete connections, like convolution

I'd like to train a small neural network in Pytorch that takes as an input an 8-dimensional vector and predicts one of three possible categories. The first hidden layer should contain 6 neurons, where each neuron takes the activations of only 3…
Yassen
  • 1
0
votes
1 answer

Convolution of Matlab functions

I want to calculate a convolution in Matlab where the I declare the functions inside the script file. MWE is a = 0.9; b = 0.5; X = @(t) exp(-(b*t).^2); Y = @(t) exp(-a*b*t.^2); Z = convnfft(X,Y,'same'); % this is how you usually do convolution…
Medulla Oblongata
  • 3,771
  • 8
  • 36
  • 75
0
votes
1 answer

The added layer must be an instance of class Layer. Found:

TypeError Traceback (most recent call last) in 1 model= tf.keras.models.Sequential() ----> 2 model.add(Conv3D(64 ,kernel_size =(3,3,3) ,strides = (1,1,1), padding = 'same',input_shape=(input_shape) ,activation…
985674123
  • 1
  • 2
1 2 3
99
100