pytorch/text

Language modelling dataset only one sample

Open

Aperta il 12 set 2018

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Python (3396 star) (822 fork)batch import
datasetshelp wanted

Descrizione

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.

Guida contributor