qiuqiangkong / torchlibrosa

MIT License
450 stars 45 forks source link

Update stft.py #13

Open cyrusvahidi opened 8 months ago

cyrusvahidi commented 8 months ago

torch.jit.script throws a cannot create weak reference to 'numpy.ufunc' object error when compiled LogmelFilterBank. I have fixed this by changing numpy operations to torch (np.maximum) and storing self.ref and self.amin as tensors.