Skip to content

module 'torch' has no attribute 'irfft #2

@anujndoshi

Description

@anujndoshi

When running the example file on Colab with GPU it raises the error.

Downloading file 'Kevin_MacLeod_-_Vibe_Ace.hq.ogg' from 'https://librosa.org/data/audio/Kevin_MacLeod_-_Vibe_Ace.hq.ogg' to '/root/.cache/librosa'.
/usr/local/lib/python3.7/dist-packages/torch/functional.py:581: UserWarning: stft will soon require the return_complex parameter be given for real inputs, and will further require that return_complex=True in a future PyTorch release. (Triggered internally at /pytorch/aten/src/ATen/native/SpectralOps.cpp:639.)
normalized, onesided, return_complex)

AttributeError Traceback (most recent call last)
in ()
16 mag = mag.cuda()
17
---> 18 yhat = griffin_lim(mag, maxiter=100, alpha=0.3, window=window)
19
20 # check convergence

1 frames
/usr/local/lib/python3.7/dist-packages/torch_specinv/methods.py in _istft(x, n_fft, win_length, window, hop_length, center, normalized, onesided, synth_coeff, offset, ola_weight)
88 A helper function to do istft.
89 """
---> 90 x = torch.irfft(x.transpose(0, 1), 1, normalized=normalized, onesided=onesided,
91 signal_sizes=[n_fft] if onesided else None)[:, offset:offset + win_length]
92

AttributeError: module 'torch' has no attribute 'irfft'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions