bregaldo / pywph

Wavelet Phase Harmonics in PyTorch for Images
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

Quick solve of in-place vs out-of-place operation problems with latest pytorch version #6

Closed Eralys closed 1 year ago

Eralys commented 1 year ago

The pywph package was not working anymore with latest pytorch version. I did a quick fixed by changing in-place operations to out-of-place operations in the wph_operator. I tested it on the tutorial. Syntheses are working, and seem much quicker than in previous versions. Still a warning that "The .grad attribute of a Tensor that is not a leaf Tensor is being accessed", which should be investigated. But at least, it works... Working with numpy==1.23.5, pytorch==2.0.0, and cuda==11.8 (latest available torch+cuda version). Retro-compatibility should be investigated for the requirement file.