mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Fix no attribute 'data' error. (#129)
This commit is contained in:
parent
e2c9c728d9
commit
769a9791ec
@ -103,7 +103,7 @@ def compile_HLG(lang_dir: str) -> k2.Fsa:
|
|||||||
LG.labels[LG.labels >= first_token_disambig_id] = 0
|
LG.labels[LG.labels >= first_token_disambig_id] = 0
|
||||||
|
|
||||||
assert isinstance(LG.aux_labels, k2.RaggedTensor)
|
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)
|
LG = k2.remove_epsilon(LG)
|
||||||
logging.info(f"LG shape after k2.remove_epsilon: {LG.shape}")
|
logging.info(f"LG shape after k2.remove_epsilon: {LG.shape}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user