未验证 提交 3638320f 编写于 作者: J Jackwaterveg 提交者: GitHub

fix self.max_len

上级 008c812f
......@@ -135,6 +135,8 @@ class ASRExecutor(BaseExecutor):
Init model and other resources from a specific path.
"""
logger.info("start to init the model")
# default max_len: unit:second
self.max_len = 50
if hasattr(self, 'model'):
logger.info('Model had been initialized.')
return
......@@ -203,8 +205,6 @@ class ASRExecutor(BaseExecutor):
self.model.set_state_dict(model_dict)
# compute the max len limit
# default max_len: unit:second
self.max_len = 50
if "conformer" in model_type or "transformer" in model_type or "wenetspeech" in model_type:
# in transformer like model, we may use the subsample rate cnn network
subsample_rate = self.model.subsampling_rate()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册