pytorch/text

Language modelling dataset only one sample

Open

#381 geöffnet am 12. Sept. 2018

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (3.396 Stars) (822 Forks)batch import
datasetshelp wanted

Beschreibung

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.

Contributor Guide