fbcotter / pytorch_wavelets

Pytorch implementation of 2D Discrete Wavelet (DWT) and Dual Tree Complex Wavelet Transforms (DTCWT) and a DTCWT based ScatterNet
Other
943 stars 146 forks source link

Separable option gone from DWT/IDWT? #20

Closed MichaelRamamonjisoa closed 3 years ago

MichaelRamamonjisoa commented 3 years ago

Hello,

Thanks a lot for this library, I was wondering if you had removed the separable flag from DWT/IDWT? https://github.com/fbcotter/pytorch_wavelets/blob/7f3163d3b3d4892c7fe24b7a54c61dcc16071763/pytorch_wavelets/dwt/transform2d.py#L18 It does not seem like it is allowed to use the separable flag in the constructor https://github.com/fbcotter/pytorch_wavelets/blob/7f3163d3b3d4892c7fe24b7a54c61dcc16071763/pytorch_wavelets/dwt/transform2d.py#L21

You mentioned it could sometimes be faster to not use the separable implementation so I was curious to try. Thanks in advance!

fbcotter commented 3 years ago

Yes, I believe after I refactored the lowlevel code, I profiled the two options and found the non-separable case to be much slower (and less pretty) so I removed support for it. I should also remove the comment

fbcotter commented 3 years ago

I think if you checkout version 1.0.1 of the code, you can use both implementations. The separable implementation in the latest version might be faster than in 1.0.1 though, so maybe compare 1.0.1 nonseparable to 1.2.4 separable

MichaelRamamonjisoa commented 3 years ago

Thank you very much!