v0lta / PyTorch-Wavelet-Toolbox

Differentiable fast wavelet transforms in PyTorch with GPU support.
https://pytorch-wavelet-toolbox.readthedocs.io
European Union Public License 1.2
279 stars 36 forks source link

v0.1.5 #46

Closed v0lta closed 1 year ago

v0lta commented 1 year ago

What's new:

Breaking changes:

v0lta commented 1 year ago

https://github.com/v0lta/PyTorch-Wavelet-Toolbox/pull/50 has the separable conv transforms for v.0.1.5 (work in progress).

v0lta commented 1 year ago

Thanks, Felix. Not having a publicly available function might be better since we do not support n-dimensional inputs anywhere else. The toolbox feels more consistent this way.

felixblanke commented 1 year ago

It bugged me that the separable attribute of WaveletPacket2D was ignored for convolutional transforms, so I added support for it. However I am not really happy with the necessary conversions between the [Tensor, Tuple[Tensor, ...]] and [Tensor, Dict[str, Tensor]] formats.

Btw: I have no clue why one test failed for cc74842

felixblanke commented 1 year ago

Currently, the default for WaveletPacket2D are non-separable transforms. Should we switch that to separable as well or keep it at non-separable?

v0lta commented 1 year ago

I think the default should ensure results are consistent with the pywt-packets. Looking at https://github.com/v0lta/PyTorch-Wavelet-Toolbox/blob/d4263467be00b64ae3074681e6593550a42d7540/src/ptwt/packets.py#L257 tells me we can keep the reflect default and have separable equal True. I think that makes lots of sense. Great Idea, @felixblanke !

v0lta commented 1 year ago

Ah, I see you added support for separable conv transforms for the 2D packets. Thank you! In this case, I would leave the defaults unchanged because I expect most users to want pywt-compatible results.

v0lta commented 1 year ago

The jit tests run just fine with torch 2.0 . I have tested this. https://github.com/v0lta/PyTorch-Wavelet-Toolbox/issues/51 is now closed. We should merge. Other changes should go into future releases.