提交 e1b581b6 编写于 作者: H huangyuxin

fix some bug, test=asr

上级 6da8465f
......@@ -85,7 +85,7 @@ scheduler: warmuplr
scheduler_conf:
warmup_steps: 25000
lr_decay: 1.0
log_interval: 1
log_interval: 100
checkpoint:
kbest_n: 50
latest_n: 5
......@@ -239,7 +239,7 @@ class U2Trainer(Trainer):
n_iter_processes=config.num_workers,
subsampling_factor=1,
num_encs=1,
dist_sampler=True,
dist_sampler=config.get('dist_sampler', False),
shortest_first=False)
self.valid_loader = BatchDataLoader(
......@@ -260,7 +260,7 @@ class U2Trainer(Trainer):
n_iter_processes=config.num_workers,
subsampling_factor=1,
num_encs=1,
dist_sampler=True,
dist_sampler=config.get('dist_sampler', False),
shortest_first=False)
logger.info("Setup train/valid Dataloader!")
else:
......
......@@ -160,9 +160,12 @@ class DefaultInitializerContext(object):
self.init_type = init_type
def __enter__(self):
from paddlespeech.s2t.modules import align
align.global_init_type = self.init_type
return self
if self.init_type is None:
return
else:
from paddlespeech.s2t.modules import align
align.global_init_type = self.init_type
return
def __exit__(self, exc_type, exc_val, exc_tb):
from paddlespeech.s2t.modules import align
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册