Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d212b8

Browse files
chaosidoAkCodes23
authored andcommitted
feat(asr): add optional auxiliary timestamp model restoration for Canary (NVIDIA-NeMo#15268)
Signed-off-by: chaosido <[email protected]> Signed-off-by: Akhil Varanasi <[email protected]>
1 parent b93d791 commit 2d212b8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

nemo/collections/asr/models/aed_multitask_models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ def __init__(self, cfg: DictConfig, trainer: Trainer = None):
253253
# Setup encoder adapters (from ASRAdapterModelMixin)
254254
self.setup_adapters()
255255

256-
timestamps_asr_model = self.__restore_timestamps_asr_model()
256+
if self.cfg.get("restore_timestamps_model", True):
257+
timestamps_asr_model = self.__restore_timestamps_asr_model()
258+
else:
259+
timestamps_asr_model = None
257260
# Using object.__setattr__ to bypass PyTorch's module registration
258261
object.__setattr__(self, 'timestamps_asr_model', timestamps_asr_model)
259262

0 commit comments

Comments
 (0)