NVIDIA / NeMo

A scalable generative AI framework built for researchers and developers working on Large Language Models, Multimodal, and Speech AI (Automatic Speech Recognition and Text-to-Speech)
https://docs.nvidia.com/nemo-framework/user-guide/latest/overview.html
Apache License 2.0
11.84k stars 2.46k forks source link

Outputs of same batch produce different results with deterministic settings on #2145

Closed rbracco closed 3 years ago

rbracco commented 3 years ago

I'm working on implementing something new but I'm having trouble getting the model to output the same thing each time. The output from the featurizer is consistent, but the output from Quartznet 15x5 (encoder + decoder) is slightly different each time. I am aware of #1030 and have taken the following steps.

Any idea what could be causing this? If I load the model weights in to a quartznet like model in pytorch lightning and set the seed, the output is the same every time. Thank you!

titu1994 commented 3 years ago

Could you try quartzner with batch size 1?

rbracco commented 3 years ago

Issue solved, SpecAugment and SpecCutout weren't getting the seed, setting the seed manually on their rng with self._rng.seed(8) in the __init__() of each solved the issue. Thank you.