-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,14 +110,14 @@ def __init__(self, | |
concat_after=concat_after, ) for _ in range(num_blocks) | ||
]) | ||
|
||
def forward( | ||
self, | ||
memory: paddle.Tensor, | ||
memory_mask: paddle.Tensor, | ||
ys_in_pad: paddle.Tensor, | ||
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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 好的 |
||
memory: paddle.Tensor, | ||
memory_mask: paddle.Tensor, | ||
ys_in_pad: paddle.Tensor, | ||
ys_in_lens: paddle.Tensor, | ||
r_ys_in_pad: paddle.Tensor=paddle.empty([0]), | ||
reverse_weight: float=0.0 | ||
) -> Tuple[paddle.Tensor, paddle.Tensor, paddle.Tensor]: | ||
"""Forward decoder. | ||
Args: | ||
memory: encoded memory, float32 (batch, maxlen_in, feat) | ||
|
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.
好的