Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Use tropical semiring for lm_paths.get_tot_scores (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Jun 16, 2021
1 parent 187ae11 commit ad161f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snowfall/decoding/lm_rescore.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def rescore_with_n_best_list(lats: k2.Fsa, G: k2.Fsa, num_paths: int,
b_to_a_map=b_to_a_map,
sorted_match_a=True)
lm_path_lats = k2.top_sort(k2.connect(lm_path_lats.to('cpu')).to(device))
lm_scores = lm_path_lats.get_tot_scores(True, True)
lm_scores = lm_path_lats.get_tot_scores(use_double_scores=True, log_semiring=False)

ans = dict()
for lm_scale in lm_scale_list:
Expand Down

0 comments on commit ad161f6

Please sign in to comment.