I have an error when trying to import torchaudio:
>>> import torchaudio
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-3-4cf0a64f61c0> in <module>
----> 1 import torchaudio
/opt/conda/lib/python3.6/site-packages/torchaudio-0.4.0a0+256458f-py3.6-linux-x86_64.egg/torchaudio/__init__.py in <module>
5 import _torch_sox
6
----> 7 from torchaudio import transforms, datasets, kaldi_io, sox_effects, compliance, _docs
8
9 try:
/opt/conda/lib/python3.6/site-packages/torchaudio-0.4.0a0+256458f-py3.6-linux-x86_64.egg/torchaudio/transforms.py in <module>
4 import torch
5 from typing import Optional
----> 6 from . import functional as F
7 from .compliance import kaldi
8
/opt/conda/lib/python3.6/site-packages/torchaudio-0.4.0a0+256458f-py3.6-linux-x86_64.egg/torchaudio/functional.py in <module>
637
638 @torch.jit.script
--> 639 def highpass_biquad(waveform, sample_rate, cutoff_freq, Q=0.707):
640 # type: (Tensor, int, float, float) -> Tensor
641 r"""Designs biquad highpass filter and performs filtering. Similar to SoX implementation.
/opt/conda/lib/python3.6/site-packages/torch/jit/__init__.py in script(obj, optimize, _frames_up, _rcb)
1209 if _rcb is None:
1210 _rcb = _gen_rcb(obj, _frames_up)
-> 1211 fn = torch._C._jit_script_compile(qualified_name, ast, _rcb, get_default_args(obj))
1212 # Forward docstrings
1213 fn.__doc__ = obj.__doc__
RuntimeError:
Arguments for call are not valid.
The following operator variants are available:
aten::div.out(Tensor self, Tensor other, *, Tensor(a!) out) -> (Tensor(a!)):
Expected a value of type 'Tensor' for argument 'self' but instead found type 'float'.
aten::div.Tensor(Tensor self, Tensor other) -> (Tensor):
Expected a value of type 'Tensor' for argument 'self' but instead found type 'float'.
aten::div.Scalar(Tensor self, Scalar other) -> (Tensor):
Expected a value of type 'Tensor' for argument 'self' but instead found type 'float'.
aten::div(int a, int b) -> (float):
Expected a value of type 'int' for argument 'a' but instead found type 'float'.
aten::div(float a, float b) -> (float):
Expected a value of type 'float' for argument 'b' but instead found type 'int'.
div(float a, Tensor b) -> (Tensor):
Expected a value of type 'Tensor' for argument 'b' but instead found type 'int'.
div(int a, Tensor b) -> (Tensor):
Expected a value of type 'int' for argument 'a' but instead found type 'float'.
The original call is:
at /opt/conda/lib/python3.6/site-packages/torchaudio-0.4.0a0+256458f-py3.6-linux-x86_64.egg/torchaudio/functional.py:654:9
sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz)
cutoff_freq (float): filter cutoff frequency
Q (float): https://en.wikipedia.org/wiki/Q_factor
Returns:
output_waveform (torch.Tensor): Dimension of `(channel, time)`
"""
GAIN = 1.
w0 = 2 * math.pi * cutoff_freq / sample_rate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
A = math.exp(GAIN / 40.0 * math.log(10))
alpha = math.sin(w0) / 2. / Q
mult = _dB2Linear(max(GAIN, 0))
b0 = (1 + math.cos(w0)) / 2
b1 = -1 - math.cos(w0)
b2 = b0
a0 = 1 + alpha
a1 = -2 * math.cos(w0)
My setup: Ubuntu running from Docker, pytorch 1.3.0a0+24ae9b5, torchaudio 0.4.0a0+256458f