-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Hackathon 7th] 修复 s2t
示例错误
#3950
Conversation
Thanks for your contribution! |
@@ -404,6 +404,12 @@ def get_dataloader(mode: str, config, args): | |||
config['subsampling_factor'] = 1 | |||
config['num_encs'] = 1 | |||
config['shortest_first'] = False | |||
config['minibatches'] = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load the params from config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
细说???
这里的 config 本来就是 clone 过来的,应该是本来就木有这几个值,还需要从哪里 load?最好是有默认值 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
ys_in_lens: paddle.Tensor, | ||
r_ys_in_pad: paddle.Tensor=paddle.empty([0]), | ||
reverse_weight: float=0.0) -> Tuple[paddle.Tensor, paddle.Tensor]: | ||
def forward(self, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only code style changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typing hint for the output changed from
-> Tuple[paddle.Tensor, paddle.Tensor]:
to
-> Tuple[paddle.Tensor, paddle.Tensor, paddle.Tensor]:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Bug fixes
PR changes
Others
Describe
修复
s2t
示例错误:paddlespeech/s2t/io/dataloader.py
中,如果走train
分支,那么config
会缺少很多配置项paddlespeech/s2t/models/u2_st/u2_st.py
中,使用的是TransformerDecoder
,这个类中forward
有3
个返回值,因此使用*_
屏蔽掉第一个之后的返回值。之所以不使用decoder_out, _, _ = self.decode...
的方式,是因为,TransformerDecoder
的forward
原来的输出可能是2
个(之前的 typing 只有两个返回值,这里同时修改为三个),因此,用*_
做兼容性处理。paddlespeech/s2t/frontend/featurizer/text_featurizer.py
的输入可能是嵌套的 list,因此这里也做了判断处理。目前测试暂时没啥问题,日志:
@zxcd @Liyulingyue @GreatV @enkilee @yinfan98