Skip to content

Commit

Permalink
Deprecate pytorch<=1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Apr 16, 2021
1 parent 27d2163 commit 6108432
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions torch_audiomentations/utils/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@
# found at https://github.com/asteroid-team/torch-audiomentations/commits

import torch
import warnings

try:
# This works in PyTorch>=1.7
from torch.fft import irfft, rfft
except ModuleNotFoundError:
# This works in PyTorch<=1.6
warnings.warn(
"Support for pytorch<=1.6 will be dropped in a future version of torch-audiomentations!"
" Please upgrade to pytorch 1.7 or newer.",
)

def rfft(input, n=None):
if n is not None:
m = input.size(-1)
Expand Down

0 comments on commit 6108432

Please sign in to comment.