Skip to content
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

[s2t] streaming conformer u2 and u2pp jit export #2502

Merged
merged 50 commits into from
Oct 9, 2022

Conversation

zh794390558
Copy link
Collaborator

PR types

New features

PR changes

Others

Describe

u2pp/u2 support static export
decoder using fowrad_attention_decoder to replace decoder
remove useless cast for bool operations
reverse_weight in decode config file
fix audio fbank api for static export

@zh794390558 zh794390558 marked this pull request as ready for review October 8, 2022 06:36
@zh794390558 zh794390558 added this to the r1.3.0 milestone Oct 8, 2022
Copy link
Contributor

@Zth9730 Zth9730 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# k = self.linear_k(key).view(n_batch, -1, self.h, self.d_k)
# v = self.linear_v(value).view(n_batch, -1, self.h, self.d_k)
k, v = F.linear(key, self.weight, self.bias).view(
n_batch, -1, 2 * self.h, self.d_k).split(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if self.training:
k = self.linear_k(key).view(n_batch, -1, self.h, self.d_k)
v = self.linear_v(value).view(n_batch, -1, self.h, self.d_k)
else:
k, v = F.linear(key, self.weight, self.bias).view(
n_batch, -1, 2 * self.h, self.d_k).split(
2, axis=2)

@Zth9730 Zth9730 merged commit c9b0c96 into PaddlePaddle:develop Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants