add dist_sampler args, test=asr

pull/1577/head
huangyuxin 4 years ago
parent a4f5a68074
commit 6da8465f14

@ -70,7 +70,7 @@ batch_bins: 0
batch_frames_in: 0 batch_frames_in: 0
batch_frames_out: 0 batch_frames_out: 0
batch_frames_inout: 0 batch_frames_inout: 0
num_workers: 0 num_workers: 2
subsampling_factor: 1 subsampling_factor: 1
num_encs: 1 num_encs: 1
@ -80,6 +80,7 @@ num_encs: 1
n_epoch: 240 n_epoch: 240
accum_grad: 2 accum_grad: 2
global_grad_clip: 5.0 global_grad_clip: 5.0
dist_sampler: True
optim: adam optim: adam
optim_conf: optim_conf:
lr: 0.002 lr: 0.002

@ -76,6 +76,7 @@ num_encs: 1
n_epoch: 240 n_epoch: 240
accum_grad: 2 accum_grad: 2
global_grad_clip: 5.0 global_grad_clip: 5.0
dist_sampler: True
optim: adam optim: adam
optim_conf: optim_conf:
lr: 0.002 lr: 0.002
@ -84,7 +85,7 @@ scheduler: warmuplr
scheduler_conf: scheduler_conf:
warmup_steps: 25000 warmup_steps: 25000
lr_decay: 1.0 lr_decay: 1.0
log_interval: 100 log_interval: 1
checkpoint: checkpoint:
kbest_n: 50 kbest_n: 50
latest_n: 5 latest_n: 5

@ -61,16 +61,17 @@ batch_frames_in: 0
batch_frames_out: 0 batch_frames_out: 0
batch_frames_inout: 0 batch_frames_inout: 0
preprocess_config: conf/preprocess.yaml preprocess_config: conf/preprocess.yaml
num_workers: 0 num_workers: 2
subsampling_factor: 1 subsampling_factor: 1
num_encs: 1 num_encs: 1
########################################### ###########################################
# Training # # Training #
########################################### ###########################################
n_epoch: 240 n_epoch: 30
accum_grad: 2 accum_grad: 2
global_grad_clip: 5.0 global_grad_clip: 5.0
dist_sampler: False
optim: adam optim: adam
optim_conf: optim_conf:
lr: 0.002 lr: 0.002

@ -51,7 +51,6 @@ from paddlespeech.s2t.utils.tensor_utils import pad_sequence
from paddlespeech.s2t.utils.tensor_utils import th_accuracy from paddlespeech.s2t.utils.tensor_utils import th_accuracy
from paddlespeech.s2t.utils.utility import log_add from paddlespeech.s2t.utils.utility import log_add
from paddlespeech.s2t.utils.utility import UpdateConfig from paddlespeech.s2t.utils.utility import UpdateConfig
# from paddlespeech.s2t.modules.initializer import initialize
__all__ = ["U2Model", "U2InferModel"] __all__ = ["U2Model", "U2InferModel"]

Loading…
Cancel
Save