fbcotter / pytorch_wavelets

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

Support for DoubleFloat #34

Closed guanhuaw closed 2 years ago

guanhuaw commented 2 years ago

Thanks for such a handy toolbox! It would be great if the package supports double precision data (not too much practical use, but can avoid some errors.)

Also, I had a very(!) ugly implementation of the 'array_to_coeffs' here Hope this would help.

fbcotter commented 2 years ago

Hey! It currently has some support for double precision using the torch.set_default_type class. See the tests here: https://github.com/fbcotter/pytorch_wavelets/blob/8d2e3b4289beaea9aa89f7b1dbb290e448331197/tests/test_dwt.py#L19