codertimo / BERT-pytorch

Google AI 2018 BERT pytorch implementation
Apache License 2.0
6.11k stars 1.29k forks source link

Erroneous code #21

Closed winitzki closed 5 years ago

winitzki commented 5 years ago

https://github.com/codertimo/BERT-pytorch/blob/7efd2b5a631f18ebc83cd16886b8c6ee77a40750/bert_pytorch/dataset/dataset.py#L53-L62

This code is incorrect - it will always go into the last if clause. For instance, prob < prob * 0.8 is never true.

codertimo commented 5 years ago

fixed by #22 duplicated with #13