From 769a9791ecbb90a1db8e8aee7b4ca03365c1c5ec Mon Sep 17 00:00:00 2001 From: Lucky Wong Date: Mon, 22 Nov 2021 18:31:04 +0800 Subject: [PATCH] Fix no attribute 'data' error. (#129) --- egs/aishell/ASR/local/compile_hlg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egs/aishell/ASR/local/compile_hlg.py b/egs/aishell/ASR/local/compile_hlg.py index 407fb7d88..098d5d6a3 100755 --- a/egs/aishell/ASR/local/compile_hlg.py +++ b/egs/aishell/ASR/local/compile_hlg.py @@ -103,7 +103,7 @@ def compile_HLG(lang_dir: str) -> k2.Fsa: LG.labels[LG.labels >= first_token_disambig_id] = 0 assert isinstance(LG.aux_labels, k2.RaggedTensor) - LG.aux_labels.data[LG.aux_labels.data >= first_word_disambig_id] = 0 + LG.aux_labels.values[LG.aux_labels.values >= first_word_disambig_id] = 0 LG = k2.remove_epsilon(LG) logging.info(f"LG shape after k2.remove_epsilon: {LG.shape}")