From d6fefe4e34faaff072ee083c1220ad6f2f37cf78 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Wed, 16 Feb 2022 12:41:47 +0800 Subject: [PATCH] Minor fixes --- .../test_asr_datamodule.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/egs/librispeech/ASR/transducer_stateless_multi_datasets/test_asr_datamodule.py b/egs/librispeech/ASR/transducer_stateless_multi_datasets/test_asr_datamodule.py index 54f152a88..e1833b841 100755 --- a/egs/librispeech/ASR/transducer_stateless_multi_datasets/test_asr_datamodule.py +++ b/egs/librispeech/ASR/transducer_stateless_multi_datasets/test_asr_datamodule.py @@ -86,12 +86,11 @@ def test_dataset(): batch_idx += 1 print("dl idx", idx, "batch_idx", batch_idx) - batch = next(dl) - cuts = batch["supervisions"]["cut"] - for c in cuts: - print(c.id) - - if batch_idx > 10: + try: + _ = next(dl) + except StopIteration: + print("dl idx", idx) + print("Go to the next epoch") break