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

details of transformer code #9

Open
lumiaomiao opened this issue Nov 18, 2021 · 0 comments
Open

details of transformer code #9

lumiaomiao opened this issue Nov 18, 2021 · 0 comments

Comments

@lumiaomiao
Copy link

lumiaomiao commented Nov 18, 2021

Thank you for your work, I have a question about sequence embedding. The screenshot is from transformer.py
When you get sequence embedding, the position embedding has already been added to sequence embedding as fllows:
image
Why do you input the same position embedding into decoder layer ? After this operation, position embedding is added to sequence embedding twice.
image

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

No branches or pull requests

1 participant