From 8d679c3e7486b7172ea13f5c79d71b286788bda9 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Wed, 10 Nov 2021 14:45:30 +0800 Subject: [PATCH] Fix typos. (#115) --- egs/librispeech/ASR/conformer_ctc/decode.py | 4 ++-- icefall/decode.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/egs/librispeech/ASR/conformer_ctc/decode.py b/egs/librispeech/ASR/conformer_ctc/decode.py index e687c5bc4..01d636f13 100755 --- a/egs/librispeech/ASR/conformer_ctc/decode.py +++ b/egs/librispeech/ASR/conformer_ctc/decode.py @@ -60,14 +60,14 @@ def get_parser(): parser.add_argument( "--epoch", type=int, - default=34, + default=77, help="It specifies the checkpoint to use for decoding." "Note: Epoch counts from 0.", ) parser.add_argument( "--avg", type=int, - default=20, + default=55, help="Number of checkpoints to average. Automatically select " "consecutive checkpoints before the checkpoint specified by " "'--epoch'. ", diff --git a/icefall/decode.py b/icefall/decode.py index 98f792783..aef37cb69 100644 --- a/icefall/decode.py +++ b/icefall/decode.py @@ -412,7 +412,9 @@ class Nbest(object): scores_shape = self.fsa.arcs.shape().remove_axis(1) # scores_shape has axes [path][arc] - ragged_scores = k2.RaggedTensor(scores_shape, self.scores.contiguous()) + ragged_scores = k2.RaggedTensor( + scores_shape, self.fsa.scores.contiguous() + ) tot_scores = ragged_scores.sum()