Closed RaoulHeese closed 2 years ago
Good catch, I think I fixed the problem in https://github.com/v0lta/PyTorch-Wavelet-Toolbox/commit/fb31c383c1472a0cb328f5c72d7327afec9aca9f . We had a bare squeeze in the code, which kills the batch_dimension if it is one. I will test this some more.
Okay, I think the patch is ready: https://github.com/v0lta/PyTorch-Wavelet-Toolbox/pull/23 deals with this.
Regarding the key error, we want a warning, we already have some for the matrix fwts https://github.com/v0lta/PyTorch-Wavelet-Toolbox/pull/16 .
Calling
ptwt.WaveletPacket2D
(and processing its outputs) can lead to not self-explanatory exceptions or unexpected results depending on the image size and the wavelet level. Evaluating the following code snippet demonstrates this behavior based on six simple tests with a test image.The expected behavior would be an informative exception on wrong usage or a valid output otherwise.