Backprop through Discrete Wavelet Transform (DWT) on GPU


It there an efficient way to perform this operation? 2D.

The naive approach is to either loop through the rows and columns or construct the matrix and multiply.

Oddly I was unable to find an example of how to do this for either theano or tensorflow.

(Thomas V) #2

You can use conv layers to have single levels (using coeffs eg from pywavelets and setting requires_grad to False.
Also check out

that seems to be the most waveletty neural network thing I have recently seen.

I think I saw Edouard around here, but I forgot his username.

Best regards



I’m not sure I understand how to reduce DWT to convolutions as you propose.
Edit: Are you proposing to basically construct nlogn conv filters? since the higher frequency wavelets are just translated and mostly 0 everywhere I suppose it’s possible. Do you have an example? Not sure how I would stitch it all up.

The scattering transform is indeed interesting but not what I’m immediately looking for, will check it out though thanks. Seems to have high potential, too bad you can’t backprop through the fast implementation though.

(Thomas V) #4

As talk is cheap, I wrote up a quick notebook on using 2D Wavelet transformations with PyTorch and hope it is useful for you.

Best regards



It certainly is, you seem like you have gone through a bit of effort.

(Tom) #6

I recently implemented a wavelet filter bank in PyTorch. Although my focus here was to write a fast temporal convolution library for wavelets, this might be of interest to you: