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

ValueError: step must be greater than zero #43

Closed Musclemanisme closed 2 years ago

Musclemanisme commented 2 years ago

Hi, great work! Recently, I encountered the error as stated in the issue title when I use the method DTCWTInverse. And the error is located in pytorch_wavelets/dtcwt/transform2d.py line 224. issue

I found that Pytorch Tensor object does not support slice operation with step=-1. I wonder why nobody issued such an issue. Does it come along with the new version of Pytorch?

Musclemanisme commented 2 years ago

Ohhhh~ I made a mistake. The args fed to DTCWTInverse should be a tuple of a tensor and a list, like (yl, [yh]). I missed the square brackets.