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

GH-1073: batch first #1077

Merged
merged 2 commits into from
Sep 6, 2019
Merged

GH-1073: batch first #1077

merged 2 commits into from
Sep 6, 2019

Conversation

alanakbik
Copy link
Collaborator

Closes #1073

This PR changes WordDropout and LockedDropout to be robust to batch_first mode. For LockedDropout this means adding a boolean parameter batch_first to the constructor that by default is set to True.

The WordDropout is now implemented differently as the previous version was a 'lcoked' word dropout that would always drop the same index words across a mini-batch. Now, words are dropped fully at random. Some initial experiments show that this improves downstream task training.

The PR also removes the transpose operations in the SequenceTagger and the DocumentRNNEmbeddings and removes the sorting logic from the DocumentRNNEmbeddings.

@kashif
Copy link
Contributor

kashif commented Sep 6, 2019

👍

1 similar comment
@alanakbik
Copy link
Collaborator Author

👍

@alanakbik alanakbik merged commit e0437d5 into master Sep 6, 2019
@alanakbik alanakbik deleted the GH-1073-batch-first branch September 10, 2019 12:52
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.

Change SequenceTagger and DocumentRNNEmbeddings to batch_first mode
2 participants