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

Bugfix/accuracy issue #52

Merged
merged 10 commits into from
Oct 16, 2022

Conversation

Masao-Someki
Copy link
Collaborator

This PR fixes some bugs that cause an accuracy drop.

fixed problems

  • Parity issue of the Legacy version of Conformer.
    • The problem was caused by the relative position encoding, which was used for legacy conformer.
  • Parity issue of Transformer Decoder.
    • The problem was caused by the caching problem. In the espnet implementation, we give None as the first cache for the forward_one_step function in the decoder class. We can give both None or torch.Tensor and the TransformerDecoder would change its computation depending on the input.
      However, in the onnx, we need to give one tensor as a dummy cache for cache=None case to avoid splitting the onnx model. This dummy cache caused an issue while computing the first LayerNorm in the second or later layers. So I removed the first sequence (dummy cache) if we need to compute with cache and the decoder layer is not the first layer.

@Masao-Someki Masao-Someki merged commit d70b85d into espnet:master Oct 16, 2022
@Masao-Someki Masao-Someki deleted the bugfix/legacy_conformer branch October 16, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant