From 0729abe02e787762acc0f0b30e4890b554f20d06 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Tue, 20 Jun 2017 12:14:24 +0800 Subject: [PATCH] tiny adjust --- decoder.py | 6 ++---- infer.py | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/decoder.py b/decoder.py index 445831aab..a23fa1329 100644 --- a/decoder.py +++ b/decoder.py @@ -1,4 +1,4 @@ -"""Contains various CTC decoder.""" +"""Contains various CTC decoders.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function @@ -103,7 +103,7 @@ def ctc_beam_search_decoder(probs_seq, beam_size to find many paths to one label, return beam_size labels in the descending order of probabilities. The implementation is based on Prefix Beam Search(https://arxiv.org/abs/1408.2873), and the unclear part is - redesigned, need to be verified. + redesigned. :param probs_seq: 2-D list with length num_time_steps, each element is a list of normalized probabilities over vocabulary @@ -262,9 +262,7 @@ def ctc_beam_search_decoder_nproc(probs_split, :type num_processes: int :return: Decoding log probabilities and result sentences in descending order. :rtype: list - ''' - if num_processes is None: num_processes = multiprocessing.cpu_count() if not num_processes > 0: diff --git a/infer.py b/infer.py index 9f6d91ca5..4545f3da0 100644 --- a/infer.py +++ b/infer.py @@ -151,7 +151,6 @@ def infer(): ## decode and print # best path decode wer_sum, wer_counter = 0, 0 - total_time = 0.0 if args.decode_method == "best_path": for i, probs in enumerate(probs_split): target_transcription = ''.join([