From e3f49aaf5901b70025584dc19a2af08639361d63 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Sat, 30 Sep 2017 07:21:34 +0000 Subject: [PATCH] fix the core dump bug of DS2's training in docker --- deep_speech_2/data_utils/featurizer/audio_featurizer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deep_speech_2/data_utils/featurizer/audio_featurizer.py b/deep_speech_2/data_utils/featurizer/audio_featurizer.py index 12f8784a..f594de7d 100644 --- a/deep_speech_2/data_utils/featurizer/audio_featurizer.py +++ b/deep_speech_2/data_utils/featurizer/audio_featurizer.py @@ -141,7 +141,8 @@ class AudioFeaturizer(object): # window weighting, squared Fast Fourier Transform (fft), scaling weighting = np.hanning(window_size)[:, None] 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 fft[1:-1, :] *= (2.0 / scale) fft[(0, -1), :] /= scale -- GitLab