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:
- Create a vector A of N > 10 random numbers, where N the user provided length of A.
- Create vector B = [1/5 1/5 1/5 1/5 1/5].
- Call myConvolve(A, B) function, estimating the convolution of inputs A and B.
- 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.
- 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.
- 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