File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
examples/aishell/asr0/conf/tuning Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1
- chunk_batch_size : 32
1
+ decode_batch_size : 32
2
2
error_rate_type : cer
3
3
decoding_method : ctc_beam_search
4
4
lang_model_path : data/lm/zh_giga.no_cna_cmn.prune01244.klm
5
5
alpha : 2.2 # 1.9
6
6
beta : 4.3
7
- beam_size : 300
7
+ beam_size : 500
8
8
cutoff_prob : 0.99
9
9
cutoff_top_n : 40
10
10
num_proc_bsearch : 10
Original file line number Diff line number Diff line change @@ -474,13 +474,10 @@ CtcBeamSearchDecoderBatch::CtcBeamSearchDecoderBatch(
474
474
ext_scorer(ext_scorer),
475
475
blank_id(blank_id) {
476
476
this ->vocabulary = vocabulary;
477
- // this->decoder_storage_vector.reserve(batch_size);
478
477
for (size_t i = 0 ; i < batch_size; i++) {
479
478
this ->decoder_storage_vector .push_back (
480
479
std::unique_ptr<CtcBeamSearchDecoderStorage>(
481
- new CtcBeamSearchDecoderStorage (beam_size)));
482
- // this->decoder_storage_vector.emplace_back(new
483
- // CtcBeamSearchDecoderStorage());
480
+ new CtcBeamSearchDecoderStorage ()));
484
481
ctc_beam_search_decode_chunk_begin (
485
482
this ->decoder_storage_vector [i]->root , ext_scorer);
486
483
}
Original file line number Diff line number Diff line change @@ -81,12 +81,10 @@ ctc_beam_search_decoder_batch(
81
81
82
82
class CtcBeamSearchDecoderStorage {
83
83
public:
84
- size_t beam_size=-1 ;
85
84
PathTrie *root = nullptr ;
86
85
std::vector<PathTrie *> prefixes;
87
86
88
- CtcBeamSearchDecoderStorage (size_t beam_size) {
89
- this ->beam_size = beam_size;
87
+ CtcBeamSearchDecoderStorage () {
90
88
// init prefixes' root
91
89
this ->root = new PathTrie ();
92
90
this ->root ->log_prob_b_prev = 0.0 ;
You can’t perform that action at this time.
0 commit comments