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

positonal encoding #2

Open
tyler-tan opened this issue Nov 7, 2023 · 1 comment
Open

positonal encoding #2

tyler-tan opened this issue Nov 7, 2023 · 1 comment

Comments

@tyler-tan
Copy link

Hello, thank you for your great work.
I am studying your code in transformer.py, you just use encoder_layers and it uses normalize_before decide whether to use position encoding. You set normalize_before as False all the time. So, do you use positional encoding? If I understand wrong, please let me know, Thank you.

@zhao1f
Copy link
Member

zhao1f commented Nov 7, 2023

Thanks for pointing out this issue. In our released code, we found that positional encoding affects the final performance insignificantly (about 0.5%) but would lead to instability during training and across other datasets. We set false in this released version, the original codes with True are commented as you point out.
Considering your problems, we roll back this setting to make it consistent with the paper.

Thanks again for the detailed issues on our work. If any other problems, feel free to email me.

@tyler-tan tyler-tan changed the title positon encoding positonal encoding Nov 7, 2023
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

2 participants