`torch.*fft` is deprecated
See original GitHub issueGetting the warnings
tests/scattering1d/test_torch_backend_1d.py::test_fft[cuda-TorchSkcudaBackend1D]
/home/jenkins/workspace/kymatio_dev/kymatio/scattering1d/backend/torch_backend.py:12: UserWarning: The function torch.fft is deprecated and will be removed in PyTorch 1.8. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.fft or torch.fft.fftn. (Triggered internally at /pytorch/aten/src/ATen/native/SpectralOps.cpp:567.)
_fft = lambda x: torch.fft(x, 1, normalized=False)
tests/scattering1d/test_torch_backend_1d.py::test_fft[cuda-TorchSkcudaBackend1D]
/home/jenkins/workspace/kymatio_dev/kymatio/scattering1d/backend/torch_backend.py:13: UserWarning: The function torch.ifft is deprecated and will be removed in a future PyTorch release. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.ifft or torch.fft.ifftn. (Triggered internally at /pytorch/aten/src/ATen/native/SpectralOps.cpp:578.)
_ifft = lambda x: torch.ifft(x, 1, normalized=False)
tests/scattering1d/test_torch_backend_1d.py::test_fft[cuda-TorchSkcudaBackend1D]
/home/jenkins/workspace/kymatio_dev/kymatio/scattering1d/backend/torch_backend.py:14: UserWarning: The function torch.irfft is deprecated and will be removed in a future PyTorch release. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.ifft or torch.fft.irfft. (Triggered internally at /pytorch/aten/src/ATen/native/SpectralOps.cpp:602.)
_irfft = lambda x: torch.irfft(x, 1, normalized=False, onesided=False)[..., None]
Should probably fix this soonish.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7
Top Results From Across the Web
The torch.fft module in PyTorch 1.7 - GitHub
This will work in PyTorch 1.6, throw a deprecation warning in PyTorch 1.7, and will not work in PyTorch 1.8 when the torch.Tensor.fft()...
Read more >Using torch.fft module to update torch.fft() deprecated functions
I'm trying to update a repo since I was getting this error: AttributeError: module 'torch' has no attribute 'rfft'.
Read more >torch.fft — PyTorch 1.13 documentation
torch.fft. Discrete Fourier transforms and related functions. ... Computes the one dimensional discrete Fourier transform of input .
Read more >Fourier transform in latest pytorch - vision
The deprecation notice in PyTorch 1.7 (which I had to look up myself, so don't feel bad about not seeing it), your use...
Read more >torch.fft.fft — PyTorch 1.13 documentation
Supports torch.half and torch.chalf on CUDA with GPU Architecture SM53 or greater. However it only supports powers of 2 signal length in every...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm ok. So they deprecated in 1.7 but didn’t provide an upgrade path until 1.8. Not cool…
At any rate, these warnings will go away from our CI once #892 merges so I’ll close this.
so … it’s not so trivial. In Torch 1.7, there is a
torch.fft
module but(they did not only move functions from
torch
totorch.fft
, they also changed the semantics)If we really insist on removing this
DeprecationWarning
, i think that our simplest response is justcatch
it by means of awarning.simplefilter
. Otherwise, i’d have to add at least three more conditional branches to Kymatio (for 1D/2D/3D) …