зеркало из https://github.com/mozilla/DeepSpeech.git
Update hyperparameters
This commit is contained in:
Родитель
d0c6ecc307
Коммит
99d0c311a3
|
@ -148,9 +148,9 @@ tf.app.flags.DEFINE_string ('alphabet_config_path', 'data/alphabet.txt', 'path
|
||||||
tf.app.flags.DEFINE_string ('lm_binary_path', 'data/lm/lm.binary', 'path to the language model binary file created with KenLM')
|
tf.app.flags.DEFINE_string ('lm_binary_path', 'data/lm/lm.binary', 'path to the language model binary file created with KenLM')
|
||||||
tf.app.flags.DEFINE_string ('lm_trie_path', 'data/lm/trie', 'path to the language model trie file created with native_client/generate_trie')
|
tf.app.flags.DEFINE_string ('lm_trie_path', 'data/lm/trie', 'path to the language model trie file created with native_client/generate_trie')
|
||||||
tf.app.flags.DEFINE_integer ('beam_width', 1024, 'beam width used in the CTC decoder when building candidate transcriptions')
|
tf.app.flags.DEFINE_integer ('beam_width', 1024, 'beam width used in the CTC decoder when building candidate transcriptions')
|
||||||
tf.app.flags.DEFINE_float ('lm_weight', 2.15, 'the alpha hyperparameter of the CTC decoder. Language Model weight.')
|
tf.app.flags.DEFINE_float ('lm_weight', 1.75, 'the alpha hyperparameter of the CTC decoder. Language Model weight.')
|
||||||
tf.app.flags.DEFINE_float ('word_count_weight', -0.10, 'the beta hyperparameter of the CTC decoder. Word insertion weight (penalty).')
|
tf.app.flags.DEFINE_float ('word_count_weight', 1.00, 'the beta hyperparameter of the CTC decoder. Word insertion weight (penalty).')
|
||||||
tf.app.flags.DEFINE_float ('valid_word_count_weight', 1.10, 'valid word insertion weight. This is used to lessen the word insertion penalty when the inserted word is part of the vocabulary.')
|
tf.app.flags.DEFINE_float ('valid_word_count_weight', 1.00, 'valid word insertion weight. This is used to lessen the word insertion penalty when the inserted word is part of the vocabulary.')
|
||||||
|
|
||||||
# Inference mode
|
# Inference mode
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
#define N_CEP 26
|
#define N_CEP 26
|
||||||
#define N_CONTEXT 9
|
#define N_CONTEXT 9
|
||||||
#define BEAM_WIDTH 500
|
#define BEAM_WIDTH 500
|
||||||
#define LM_WEIGHT 2.15f
|
#define LM_WEIGHT 1.75f
|
||||||
#define WORD_COUNT_WEIGHT -0.10f
|
#define WORD_COUNT_WEIGHT 1.00f
|
||||||
#define VALID_WORD_COUNT_WEIGHT 1.10f
|
#define VALID_WORD_COUNT_WEIGHT 1.00f
|
||||||
|
|
||||||
using namespace DeepSpeech;
|
using namespace DeepSpeech;
|
||||||
|
|
||||||
|
|
|
@ -10,14 +10,14 @@ const MemoryStream = require('memory-stream');
|
||||||
const BEAM_WIDTH = 500;
|
const BEAM_WIDTH = 500;
|
||||||
|
|
||||||
// The alpha hyperparameter of the CTC decoder. Language Model weight
|
// The alpha hyperparameter of the CTC decoder. Language Model weight
|
||||||
const LM_WEIGHT = 2.15;
|
const LM_WEIGHT = 1.75;
|
||||||
|
|
||||||
// The beta hyperparameter of the CTC decoder. Word insertion weight (penalty)
|
// The beta hyperparameter of the CTC decoder. Word insertion weight (penalty)
|
||||||
const WORD_COUNT_WEIGHT = -0.10;
|
const WORD_COUNT_WEIGHT = 1.00;
|
||||||
|
|
||||||
// Valid word insertion weight. This is used to lessen the word insertion penalty
|
// Valid word insertion weight. This is used to lessen the word insertion penalty
|
||||||
// when the inserted word is part of the vocabulary
|
// when the inserted word is part of the vocabulary
|
||||||
const VALID_WORD_COUNT_WEIGHT = 1.10;
|
const VALID_WORD_COUNT_WEIGHT = 1.00;
|
||||||
|
|
||||||
|
|
||||||
// These constants are tied to the shape of the graph used (changing them changes
|
// These constants are tied to the shape of the graph used (changing them changes
|
||||||
|
|
|
@ -14,14 +14,14 @@ from deepspeech.model import Model
|
||||||
BEAM_WIDTH = 500
|
BEAM_WIDTH = 500
|
||||||
|
|
||||||
# The alpha hyperparameter of the CTC decoder. Language Model weight
|
# The alpha hyperparameter of the CTC decoder. Language Model weight
|
||||||
LM_WEIGHT = 2.15
|
LM_WEIGHT = 1.75
|
||||||
|
|
||||||
# The beta hyperparameter of the CTC decoder. Word insertion weight (penalty)
|
# The beta hyperparameter of the CTC decoder. Word insertion weight (penalty)
|
||||||
WORD_COUNT_WEIGHT = -0.10
|
WORD_COUNT_WEIGHT = 1.00
|
||||||
|
|
||||||
# Valid word insertion weight. This is used to lessen the word insertion penalty
|
# Valid word insertion weight. This is used to lessen the word insertion penalty
|
||||||
# when the inserted word is part of the vocabulary
|
# when the inserted word is part of the vocabulary
|
||||||
VALID_WORD_COUNT_WEIGHT = 1.10
|
VALID_WORD_COUNT_WEIGHT = 1.00
|
||||||
|
|
||||||
|
|
||||||
# These constants are tied to the shape of the graph used (changing them changes
|
# These constants are tied to the shape of the graph used (changing them changes
|
||||||
|
|
Загрузка…
Ссылка в новой задаче