Topic: 1D convolutions constitute the basis for understanding 2D and 3D convolutions which are prevalent in machine learning and convolutional neural networks (CNNs) and they are mostly used for time-series analysis, e.g. audio, text, sensor data (gyroscope, accelerometer), natural language processing (NLP).

Exercise: Create a python script and perform the following tasks:

  1. Create a vector A of N > 10 random numbers, where N the user provided length of A.
  2. Create vector B = [1/5 1/5  1/5  1/5  1/5].
  3. Call myConvolve(A, B) function, estimating the convolution of inputs A and B.
  4. Call myConvolve function using sound signals sample_audio.wav and pink_noise.wav as inputs, and write convolution output to the sound file pinkNoise_sampleAudio.wav.
  5. Create signal of white noise, white_noise.wav, convolve It with sample_audio.wav and write convolution output to the sound file whiteNoise_sampleAudio.wav.
  6. Parallelize myConvolve with the aid of PyCUDA.

Instructions and Material for solution:

Exercise files include:

  • sample_audio.wav 
  • pink_noise.wav

Click here to download the exercise material.

Lecture for better understanding:  https://icarus.csd.auth.gr/fast-1d-convolution-algorithms-lecture/

This exercise was developed by N. Petrou.

————————————————————————————————————–——–

For the solutions to the exercises, please contact koroniioanna@csd.auth.gr