mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Fix LG log file name (#657)
This commit is contained in:
parent
163d929601
commit
64aed2cdeb
@ -504,8 +504,8 @@ def decode_one_batch(
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
key += f"_num_paths_{params.num_paths}_"
|
key += f"_num_paths_{params.num_paths}_"
|
||||||
key += f"nbest_scale_{params.nbest_scale}"
|
key += f"nbest_scale_{params.nbest_scale}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
||||||
|
|
||||||
return {key: hyps}
|
return {key: hyps}
|
||||||
else:
|
else:
|
||||||
@ -675,8 +675,8 @@ def main():
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
||||||
params.suffix += f"-num-paths-{params.num_paths}"
|
params.suffix += f"-num-paths-{params.num_paths}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
||||||
elif "beam_search" in params.decoding_method:
|
elif "beam_search" in params.decoding_method:
|
||||||
params.suffix += (
|
params.suffix += (
|
||||||
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
||||||
|
@ -527,8 +527,8 @@ def decode_one_batch(
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
key += f"_num_paths_{params.num_paths}_"
|
key += f"_num_paths_{params.num_paths}_"
|
||||||
key += f"nbest_scale_{params.nbest_scale}"
|
key += f"nbest_scale_{params.nbest_scale}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
||||||
|
|
||||||
return {key: hyps}
|
return {key: hyps}
|
||||||
else:
|
else:
|
||||||
@ -697,8 +697,8 @@ def main():
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
||||||
params.suffix += f"-num-paths-{params.num_paths}"
|
params.suffix += f"-num-paths-{params.num_paths}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
||||||
elif "beam_search" in params.decoding_method:
|
elif "beam_search" in params.decoding_method:
|
||||||
params.suffix += (
|
params.suffix += (
|
||||||
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
||||||
|
@ -686,8 +686,8 @@ def decode_one_batch(
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
key += f"_num_paths_{params.num_paths}_"
|
key += f"_num_paths_{params.num_paths}_"
|
||||||
key += f"nbest_scale_{params.nbest_scale}"
|
key += f"nbest_scale_{params.nbest_scale}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
||||||
return {key: hyps}
|
return {key: hyps}
|
||||||
else:
|
else:
|
||||||
return {
|
return {
|
||||||
@ -936,8 +936,8 @@ def main():
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
||||||
params.suffix += f"-num-paths-{params.num_paths}"
|
params.suffix += f"-num-paths-{params.num_paths}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
||||||
elif "beam_search" in params.decoding_method:
|
elif "beam_search" in params.decoding_method:
|
||||||
params.suffix += (
|
params.suffix += (
|
||||||
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
||||||
|
@ -551,8 +551,8 @@ def decode_one_batch(
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
key += f"_num_paths_{params.num_paths}_"
|
key += f"_num_paths_{params.num_paths}_"
|
||||||
key += f"nbest_scale_{params.nbest_scale}"
|
key += f"nbest_scale_{params.nbest_scale}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
||||||
|
|
||||||
return {key: (hyps, timestamps)}
|
return {key: (hyps, timestamps)}
|
||||||
else:
|
else:
|
||||||
@ -770,8 +770,8 @@ def main():
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
||||||
params.suffix += f"-num-paths-{params.num_paths}"
|
params.suffix += f"-num-paths-{params.num_paths}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
||||||
elif "beam_search" in params.decoding_method:
|
elif "beam_search" in params.decoding_method:
|
||||||
params.suffix += (
|
params.suffix += (
|
||||||
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
||||||
|
@ -516,8 +516,8 @@ def decode_one_batch(
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
key += f"_num_paths_{params.num_paths}_"
|
key += f"_num_paths_{params.num_paths}_"
|
||||||
key += f"nbest_scale_{params.nbest_scale}"
|
key += f"nbest_scale_{params.nbest_scale}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
key += f"_ngram_lm_scale_{params.ngram_lm_scale}"
|
||||||
|
|
||||||
return {key: hyps}
|
return {key: hyps}
|
||||||
else:
|
else:
|
||||||
@ -685,8 +685,8 @@ def main():
|
|||||||
if "nbest" in params.decoding_method:
|
if "nbest" in params.decoding_method:
|
||||||
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
params.suffix += f"-nbest-scale-{params.nbest_scale}"
|
||||||
params.suffix += f"-num-paths-{params.num_paths}"
|
params.suffix += f"-num-paths-{params.num_paths}"
|
||||||
if "LG" in params.decoding_method:
|
if "LG" in params.decoding_method:
|
||||||
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
params.suffix += f"-ngram-lm-scale-{params.ngram_lm_scale}"
|
||||||
elif "beam_search" in params.decoding_method:
|
elif "beam_search" in params.decoding_method:
|
||||||
params.suffix += (
|
params.suffix += (
|
||||||
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
f"-{params.decoding_method}-beam-size-{params.beam_size}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user