Applying CutOut in evaluation
> SpectrumAugmentation is not being applied to data in evaluation

All spec augment is disabled by default in evaluation steps (validation and testing). https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/asr/models/ctc_models.py#L542-L543

model.transcribe() forcibly uses model.eval() - which again disables model.training to False. This is by design - we do not allow spec augment to be used during inference.

If its a requirement, you can copy paste the transcribe() method and simply force the model.training = True before calling the data loaders - but note that batch norm will be active and your results will be incorrect as compared to the original model.transcribe() (ofc the spec augment will also affect outputs).

Another approach is subclass EncDecCTCModel and override the forward method to always apply spec augment instead of looking at the model.training property.  That makes sense! I had to re-bind the forward method instead of subclassing since from_pretrained returns the model directly, but same idea. Thank you for the prompt help!
I'm trying to deliberately worsen the outputs of an existing pre-trained model. Specifically, I was hoping to apply CutOut to the audio data so that the model outputs will be missing some tokens / frequencies.

My implementation thus far is to just change to `.spec_augmentation` attribute of the model.

`import nemo.collections.asr as nemo_asr
jasper = nemo_asr.models.EncDecCTCModel.from_pretrained(model_name="stt_en_jasper10x5dr")
spectrogram_aug = nemo_asr.modules.SpectrogramAugmentation(rect_masks=1000, rect_time=1200, rect_freq=500) # huge values to see if anything changes
jasper.spec_augmentation = spectrogram_aug
transcripts = jasper.transcribe(paths2audio_files=[
    'LibriSpeech_sample.flac', # random audio files
    'CHiME5_sample.wav',
])
`

However, I found that the transcripts do not change, suggesting that the SpectrumAugmentation is not being applied to data in evaluation. Even when the`jasper.training` is set to `True`, there is no change in the outputted transcripts. Am I missing something? Thank you!