未验证 提交 8ffc3b2a 编写于 作者: S smallv0221 提交者: GitHub

Add __len__ to squad dataset (#4989)

* update lrscheduler

* minor fix

* add pre-commit

* minor fix

* Add __len__ to squad dataset

* minor fix
上级 9c7c5a53
......@@ -445,6 +445,9 @@ class SQuAD(Dataset):
self.examples = examples
def __len__(self):
return len(self.data)
def __getitem__(self, idx):
feature = self.data[idx]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册