Fix dithering bug in DALI pipeline

This commit is contained in:
Adrian Lancucki 2021-09-22 12:20:54 +02:00
parent 03a93a1cb2
commit 6d8ddbbc67
2 changed files with 2 additions and 3 deletions

View file

@ -136,7 +136,7 @@ class DaliPipeline():
audio = audio.gpu()
if self.dither_coeff != 0.:
audio = audio + fn.random.normal(device=preprocessing_device) * self.dither_coeff
audio = audio + fn.random.normal(audio) * self.dither_coeff
audio = fn.preemphasis_filter(audio, preemph_coeff=preemph_coeff)

View file

@ -167,8 +167,7 @@ def dali_asr_pipeline(train_pipeline, # True if training, False if validation
audio = audio.gpu()
if dither_coeff != 0.:
audio = audio + fn.random.normal(device=preprocessing_device
) * dither_coeff
audio = audio + fn.random.normal(audio) * dither_coeff
audio = fn.preemphasis_filter(audio, preemph_coeff=preemph_coeff)