change for pruned rnnt5 train.py (#519)

This commit is contained in:
Mingshuang Luo 2022-08-04 12:29:39 +08:00 committed by GitHub
parent 36eacaccb2
commit e538232485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1144,8 +1144,6 @@ def display_and_save_batch(
y = graph_compiler.texts_to_ids(texts) y = graph_compiler.texts_to_ids(texts)
if type(y) == list: if type(y) == list:
y = k2.RaggedTensor(y) y = k2.RaggedTensor(y)
else:
y = y
num_tokens = sum(len(i) for i in y) num_tokens = sum(len(i) for i in y)
logging.info(f"num tokens: {num_tokens}") logging.info(f"num tokens: {num_tokens}")