|
|
@ -1,3 +1,40 @@
|
|
|
|
|
|
|
|
# network architecture
|
|
|
|
|
|
|
|
model:
|
|
|
|
|
|
|
|
cmvn_file:
|
|
|
|
|
|
|
|
cmvn_file_type: "json"
|
|
|
|
|
|
|
|
# encoder related
|
|
|
|
|
|
|
|
encoder: transformer
|
|
|
|
|
|
|
|
encoder_conf:
|
|
|
|
|
|
|
|
output_size: 256 # dimension of attention
|
|
|
|
|
|
|
|
attention_heads: 4
|
|
|
|
|
|
|
|
linear_units: 2048 # the number of units of position-wise feed forward
|
|
|
|
|
|
|
|
num_blocks: 12 # the number of encoder blocks
|
|
|
|
|
|
|
|
dropout_rate: 0.1
|
|
|
|
|
|
|
|
positional_dropout_rate: 0.1
|
|
|
|
|
|
|
|
attention_dropout_rate: 0.0
|
|
|
|
|
|
|
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
|
|
|
|
|
|
|
normalize_before: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# decoder related
|
|
|
|
|
|
|
|
decoder: transformer
|
|
|
|
|
|
|
|
decoder_conf:
|
|
|
|
|
|
|
|
attention_heads: 4
|
|
|
|
|
|
|
|
linear_units: 2048
|
|
|
|
|
|
|
|
num_blocks: 6
|
|
|
|
|
|
|
|
dropout_rate: 0.1
|
|
|
|
|
|
|
|
positional_dropout_rate: 0.1
|
|
|
|
|
|
|
|
self_attention_dropout_rate: 0.0
|
|
|
|
|
|
|
|
src_attention_dropout_rate: 0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# hybrid CTC/attention
|
|
|
|
|
|
|
|
model_conf:
|
|
|
|
|
|
|
|
ctc_weight: 0.3
|
|
|
|
|
|
|
|
ctc_dropoutrate: 0.0
|
|
|
|
|
|
|
|
ctc_grad_norm_type: null
|
|
|
|
|
|
|
|
lsm_weight: 0.1 # label smoothing option
|
|
|
|
|
|
|
|
length_normalized_loss: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# https://yaml.org/type/float.html
|
|
|
|
# https://yaml.org/type/float.html
|
|
|
|
data:
|
|
|
|
data:
|
|
|
|
train_manifest: data/manifest.train
|
|
|
|
train_manifest: data/manifest.train
|
|
|
@ -36,43 +73,6 @@ collator:
|
|
|
|
num_workers: 2
|
|
|
|
num_workers: 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# network architecture
|
|
|
|
|
|
|
|
model:
|
|
|
|
|
|
|
|
cmvn_file:
|
|
|
|
|
|
|
|
cmvn_file_type: "json"
|
|
|
|
|
|
|
|
# encoder related
|
|
|
|
|
|
|
|
encoder: transformer
|
|
|
|
|
|
|
|
encoder_conf:
|
|
|
|
|
|
|
|
output_size: 256 # dimension of attention
|
|
|
|
|
|
|
|
attention_heads: 4
|
|
|
|
|
|
|
|
linear_units: 2048 # the number of units of position-wise feed forward
|
|
|
|
|
|
|
|
num_blocks: 12 # the number of encoder blocks
|
|
|
|
|
|
|
|
dropout_rate: 0.1
|
|
|
|
|
|
|
|
positional_dropout_rate: 0.1
|
|
|
|
|
|
|
|
attention_dropout_rate: 0.0
|
|
|
|
|
|
|
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
|
|
|
|
|
|
|
normalize_before: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# decoder related
|
|
|
|
|
|
|
|
decoder: transformer
|
|
|
|
|
|
|
|
decoder_conf:
|
|
|
|
|
|
|
|
attention_heads: 4
|
|
|
|
|
|
|
|
linear_units: 2048
|
|
|
|
|
|
|
|
num_blocks: 6
|
|
|
|
|
|
|
|
dropout_rate: 0.1
|
|
|
|
|
|
|
|
positional_dropout_rate: 0.1
|
|
|
|
|
|
|
|
self_attention_dropout_rate: 0.0
|
|
|
|
|
|
|
|
src_attention_dropout_rate: 0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# hybrid CTC/attention
|
|
|
|
|
|
|
|
model_conf:
|
|
|
|
|
|
|
|
ctc_weight: 0.3
|
|
|
|
|
|
|
|
ctc_dropoutrate: 0.0
|
|
|
|
|
|
|
|
ctc_grad_norm_type: null
|
|
|
|
|
|
|
|
lsm_weight: 0.1 # label smoothing option
|
|
|
|
|
|
|
|
length_normalized_loss: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
training:
|
|
|
|
training:
|
|
|
|
n_epoch: 120
|
|
|
|
n_epoch: 120
|
|
|
|
accum_grad: 4
|
|
|
|
accum_grad: 4
|
|
|
|