torchtext.data.dataset — torchtext 0.8.0 documentation
pytorch.org › text › _modulesSource code for torchtext.data.dataset. [docs] class Dataset(torch.utils.data.Dataset): """Defines a dataset composed of Examples along with its Fields. Attributes: sort_key (callable): A key to use for sorting dataset examples for batching together examples with similar lengths to minimize padding. examples (list (Example)): The examples in ...
torchtext.datasets — torchtext 0.11.0 documentation
pytorch.org › text › stabletorchtext.datasets.WikiText103 (root='.data', split=('train', 'valid', 'test')) [source] ¶ WikiText103 dataset. Separately returns the train/valid/test split. Number of lines per split: train: 1801350. valid: 3760. test: 4358. Parameters. root – Directory where the datasets are saved. Default: .data. split – split or splits to be returned ...