datasets.rst 1.9 KB
Newer Older
1
2
3
4
torchaudio.datasets
====================

All datasets are subclasses of :class:`torch.utils.data.Dataset`
5
and have ``__getitem__`` and ``__len__`` methods implemented.
6
Hence, they can all be passed to a :class:`torch.utils.data.DataLoader`
7
which can load multiple samples parallelly using ``torch.multiprocessing`` workers.
8
For example: ::
9

10
    yesno_data = torchaudio.datasets.YESNO('.', download=True)
11
    data_loader = torch.utils.data.DataLoader(yesno_data,
12
13
14
15
16
17
18
19
20
21
22
23
24
                                              batch_size=1,
                                              shuffle=True,
                                              num_workers=args.nThreads)

The following datasets are available:

.. contents:: Datasets
    :local:

All the datasets have almost similar API. They all have two common arguments:
``transform`` and  ``target_transform`` to transform the input and target respectively.


25
.. currentmodule:: torchaudio.datasets
26
27


jimchen90's avatar
jimchen90 committed
28
29
30
31
CMUARCTIC
~~~~~~~~~

.. autoclass:: CMUARCTIC
32
33
  :members:
  :special-members: __getitem__
jimchen90's avatar
jimchen90 committed
34
35


yangarbiter's avatar
yangarbiter committed
36
37
38
39
40
41
42
43
CMUDict
~~~~~~~~~

.. autoclass:: CMUDict
  :members:
  :special-members: __getitem__


Vincent QB's avatar
Vincent QB committed
44
45
46
47
COMMONVOICE
~~~~~~~~~~~

.. autoclass:: COMMONVOICE
48
49
  :members:
  :special-members: __getitem__
Vincent QB's avatar
Vincent QB committed
50
51


52
53
54
55
GTZAN
~~~~~

.. autoclass:: GTZAN
56
57
  :members:
  :special-members: __getitem__
58
59


Vincent QB's avatar
Vincent QB committed
60
61
62
63
LIBRISPEECH
~~~~~~~~~~~

.. autoclass:: LIBRISPEECH
64
65
  :members:
  :special-members: __getitem__
Vincent QB's avatar
Vincent QB committed
66
67


jimchen90's avatar
jimchen90 committed
68
69
70
71
LIBRITTS
~~~~~~~~

.. autoclass:: LIBRITTS
72
73
  :members:
  :special-members: __getitem__
jimchen90's avatar
jimchen90 committed
74
75


Vincent QB's avatar
Vincent QB committed
76
77
78
79
LJSPEECH
~~~~~~~~

.. autoclass:: LJSPEECH
80
81
  :members:
  :special-members: __getitem__
Vincent QB's avatar
Vincent QB committed
82
83
84
85
86
87


SPEECHCOMMANDS
~~~~~~~~~~~~~~

.. autoclass:: SPEECHCOMMANDS
88
89
  :members:
  :special-members: __getitem__
Vincent QB's avatar
Vincent QB committed
90
91


92
93
94
95
TEDLIUM
~~~~~~~~~~~~~~

.. autoclass:: TEDLIUM
96
97
98
  :members:
  :special-members: __getitem__

99

Abhishek Dubey's avatar
Abhishek Dubey committed
100
101
102
103
VCTK_092
~~~~~~~~

.. autoclass:: VCTK_092
104
105
  :members:
  :special-members: __getitem__
Abhishek Dubey's avatar
Abhishek Dubey committed
106
107


108
YESNO
Vincent QB's avatar
Vincent QB committed
109
~~~~~
110
111

.. autoclass:: YESNO
112
113
  :members:
  :special-members: __getitem__