Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Create AlternatingRandomizedBatchSampler #737

Closed
wants to merge 1 commit into from

Conversation

sdhanson
Copy link

Summary:
The AlternatingRandomizedBatchSampler is a RandomizedBatchSampler that alternates creating batches from two sets of keys. It takes two dictionaries of unnormalized iterator probabilities and chooses a batch using a key from the first dictionary using the corresponding probabilities and then a batch from the other dictionary the next round.

The AlternatingRandomizedBatchSampler is intended to be used during XLM pre-training to enforce a pattern of MLM, TLM, MLM, TLM tasks.

Differential Revision: D15931223

Summary:
The AlternatingRandomizedBatchSampler is a RandomizedBatchSampler that alternates creating batches from two sets of keys. It takes two dictionaries of unnormalized iterator probabilities and chooses a batch using a key from the first dictionary using the corresponding probabilities and then a batch from the other dictionary the next round.

The AlternatingRandomizedBatchSampler is intended to be used during XLM pre-training to enforce a pattern of MLM, TLM, MLM, TLM tasks.

Differential Revision: D15931223

fbshipit-source-id: 137641002d175c5b0d7cdada28b0f3536b8bb78b
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 27, 2019
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 90c1445.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants