codertimo / BERT-pytorch

Google AI 2018 BERT pytorch implementation
Apache License 2.0
6.18k stars 1.3k forks source link

Erroneous Code #65

Open LeoLai930603 opened 5 years ago

LeoLai930603 commented 5 years ago

I believe there are something wrong here. Even though I have never get into this if-clause during experiment.

https://github.com/codertimo/BERT-pytorch/blob/d10dc4f9d5a6f2ca74380f62039526eb7277c671/bert_pytorch/dataset/dataset.py#L17-L20

Are you trying to self-increase a NoneType? And I am wondering what the corpus_lines is for here, remembering the how many lines have been read or setting the maximum readable lines?