from local

This commit is contained in:
dohe0342 2023-02-02 19:01:46 +09:00
parent 052a9ed91a
commit 5b6167c80d
2 changed files with 3 additions and 1 deletions

View File

@ -268,7 +268,9 @@ def decode_one_batch(
topk_log_probs, topk_indexes = nnet_output[i].topk(1)
topk_indexes = topk_indexes.squeeze().unique_consecutive()
topk_indexes = topk_indexes[topk_indexes != 0]
print(topk_indexes)
hyp = ''
for idx in topk_indexes:
hyp += token_dict[idx]
exit()