dataset / dataset.py 有一个错误吗?
作者: ndn-love创建于 2021年8月22日更新于 2023年5月15日
"
def get_random_line(self):
if self.on_memory:
self.lines[random.randrange(len(self.lines))][1]
" 此代码用于获取错误的下一句(isNotNext:0),可能会随机获取一条它是(isnext:1)的句子。
内容来源: codertimo/BERT-pytorch