8000 Fixing BERT mask size by ethanjperez · Pull Request #2429 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Fixing BERT mask size #2429

Merged
merged 2 commits into from
Jan 23, 2019
Merged

Fixing BERT mask size #2429

merged 2 commits into from
Jan 23, 2019

Conversation

ethanjperez
Copy link
Contributor

Input tokens are truncated to <512 tokens long to fit into BERT. When this happens, the mask associated with that sample appears to not also be truncated. This edit is a fix for that issue, which can cause size mismatch errors downstream when the mask is used (See this issue). @joelgrus

ethanjperez and others added 2 commits January 23, 2019 12:37
Input tokens are truncated to <512 tokens long to fit into BERT. When this happens, the mask associated with that sample appears to not also be truncated. This edit is a fix for that issue, which can cause size mismatch errors downstream when the mask is used.
Copy link
Contributor
@joelgrus joelgrus left a comment

Choose a reason for hiding this comment

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

looks good, thanks for catching this

@ethanjperez
Copy link
Contributor Author

No problem, thanks for adding BERT :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0