Commit 0cb45bcb authored by Myle Ott's avatar Myle Ott Committed by Facebook Github Bot
Browse files

Bugfix

Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/717

Differential Revision: D15254560

Pulled By: myleott

fbshipit-source-id: 2a07614e8d294636f706939e60f0091c73115494
parent 6a7eb6ce
......@@ -166,7 +166,7 @@ class MaskedLMDataset(FairseqDataset):
# replace with random token if probability is less than
# masking_prob + random_token_prob (Eg: 0.9)
elif rand < (self.masking_ratio + self.random_token_prob):
elif rand < (self.masking_ratio + self.random_token_prob):
# sample random token from dictionary
masked_sent[i] = (
np.random.randint(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment