Skip to content

Commit b9ef765

Browse files
author
Yibing Liu
committed
fix the core dump bug of DS2's training in docker
1 parent 248cc03 commit b9ef765

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deep_speech_2/data_utils/featurizer/audio_featurizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ def _specgram_real(self, samples, window_size, stride_size, sample_rate):
141141
# window weighting, squared Fast Fourier Transform (fft), scaling
142142
weighting = np.hanning(window_size)[:, None]
143143
fft = np.fft.rfft(windows * weighting, axis=0)
144-
fft = np.absolute(fft)**2
144+
fft = np.absolute(fft)
145+
fft = fft ** 2
145146
scale = np.sum(weighting**2) * sample_rate
146147
fft[1:-1, :] *= (2.0 / scale)
147148
fft[(0, -1), :] /= scale

0 commit comments

Comments
 (0)