提交 e3f49aaf 编写于 作者: Y Yibing Liu

fix the core dump bug of DS2's training in docker

上级 248cc037
...@@ -141,7 +141,8 @@ class AudioFeaturizer(object): ...@@ -141,7 +141,8 @@ class AudioFeaturizer(object):
# window weighting, squared Fast Fourier Transform (fft), scaling # window weighting, squared Fast Fourier Transform (fft), scaling
weighting = np.hanning(window_size)[:, None] weighting = np.hanning(window_size)[:, None]
fft = np.fft.rfft(windows * weighting, axis=0) fft = np.fft.rfft(windows * weighting, axis=0)
fft = np.absolute(fft)**2 fft = np.absolute(fft)
fft = fft**2
scale = np.sum(weighting**2) * sample_rate scale = np.sum(weighting**2) * sample_rate
fft[1:-1, :] *= (2.0 / scale) fft[1:-1, :] *= (2.0 / scale)
fft[(0, -1), :] /= scale fft[(0, -1), :] /= scale
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册