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

Use tropical semiring for lm_paths.get_tot_scores #214

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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