DeepLearningExamples
DeepLearningExamples copied to clipboard
return_complex is required for torch.stft since torchv2.0.0
Hi team, I am trying to upgrade PyTorch to 2.0.0+cu118 to support Hopper and come across the following error:
RuntimeError: stft requires the return_complex parameter be given for real inputs, and will further require that return_complex=True in a future PyTorch release.
The root cause is at: https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/SpeechRecognition/Jasper/common/features.py#L250
Adding return_complex=False solves the problem.
However, since return_complex=False will be deprecated, a workaround would be required to support future versions of PyTorch.