diff --git a/egs/librispeech/ASR/zipformer/train.py b/egs/librispeech/ASR/zipformer/train.py index 1111d32ab7..04caf2fd80 100755 --- a/egs/librispeech/ASR/zipformer/train.py +++ b/egs/librispeech/ASR/zipformer/train.py @@ -966,7 +966,10 @@ def save_bad_model(suffix: str = ""): scaler.step(optimizer) scaler.update() optimizer.zero_grad() - except: # noqa + except Exception as e: + logging.info( + f"Caught exception: {e}." + ) save_bad_model() display_and_save_batch(batch, params=params, sp=sp) raise