Skip to content

Commit 181eb62

Browse files
committed
Merge branch 'develop' into ctcdecoders
2 parents fe09329 + 2082b89 commit 181eb62

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
chunk_batch_size: 32
1+
decode_batch_size: 32
22
error_rate_type: cer
33
decoding_method: ctc_beam_search
44
lang_model_path: data/lm/zh_giga.no_cna_cmn.prune01244.klm
55
alpha: 2.2 #1.9
66
beta: 4.3
7-
beam_size: 300
7+
beam_size: 500
88
cutoff_prob: 0.99
99
cutoff_top_n: 40
1010
num_proc_bsearch: 10

third_party/ctc_decoders/ctc_beam_search_decoder.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,10 @@ CtcBeamSearchDecoderBatch::CtcBeamSearchDecoderBatch(
474474
ext_scorer(ext_scorer),
475475
blank_id(blank_id) {
476476
this->vocabulary = vocabulary;
477-
// this->decoder_storage_vector.reserve(batch_size);
478477
for (size_t i = 0; i < batch_size; i++) {
479478
this->decoder_storage_vector.push_back(
480479
std::unique_ptr<CtcBeamSearchDecoderStorage>(
481-
new CtcBeamSearchDecoderStorage(beam_size)));
482-
// this->decoder_storage_vector.emplace_back(new
483-
// CtcBeamSearchDecoderStorage());
480+
new CtcBeamSearchDecoderStorage()));
484481
ctc_beam_search_decode_chunk_begin(
485482
this->decoder_storage_vector[i]->root, ext_scorer);
486483
}

third_party/ctc_decoders/ctc_beam_search_decoder.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ ctc_beam_search_decoder_batch(
8181

8282
class CtcBeamSearchDecoderStorage {
8383
public:
84-
size_t beam_size=-1;
8584
PathTrie *root = nullptr;
8685
std::vector<PathTrie *> prefixes;
8786

88-
CtcBeamSearchDecoderStorage(size_t beam_size) {
89-
this->beam_size = beam_size;
87+
CtcBeamSearchDecoderStorage() {
9088
// init prefixes' root
9189
this->root = new PathTrie();
9290
this->root->log_prob_b_prev = 0.0;

0 commit comments

Comments
 (0)