pytorch/text

Language modelling dataset only one sample

Open

#381 建立於 2018年9月12日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Python (822 fork)batch import
datasetshelp wanted

倉庫指標

Star
 (3,396 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

from torchtext import data
from torchtext import datasets

TEXT = data.Field(lower=True, batch_first=True)

train, valid, test = datasets.WikiText2.splits(TEXT)

print('len(train)', len(train))

This returns a length of one. It should print the length of the whole dataset. I have tried both with version 0.2.3 and 0.3 and none of them worked.

貢獻者指南