mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-28 19:24:17 +00:00
Minor fixes.
This commit is contained in:
parent
3bcdecda44
commit
940aedf7ce
@ -479,14 +479,13 @@ def decode_dataset(
|
|||||||
assert (
|
assert (
|
||||||
len(results) > 0
|
len(results) > 0
|
||||||
), "It should not decode to empty in the first batch!"
|
), "It should not decode to empty in the first batch!"
|
||||||
keys = list(results.keys())
|
this_batch = []
|
||||||
for lm_scale in keys:
|
hyp_words = []
|
||||||
this_batch = []
|
for ref_text in texts:
|
||||||
hyp_words = []
|
ref_words = ref_text.split()
|
||||||
for ref_text in texts:
|
this_batch.append((ref_words, hyp_words))
|
||||||
ref_words = ref_text.split()
|
|
||||||
this_batch.append((ref_words, hyp_words))
|
|
||||||
|
|
||||||
|
for lm_scale in results.keys():
|
||||||
results[lm_scale].extend(this_batch)
|
results[lm_scale].extend(this_batch)
|
||||||
|
|
||||||
num_cuts += len(texts)
|
num_cuts += len(texts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user