GTZAN¶
- class torchaudio.datasets.GTZAN(root: Union[str, Path], url: str = 'http://opihi.cs.uvic.ca/sound/genres.tar.gz', folder_in_archive: str = 'genres', download: bool = False, subset: Optional[str] = None)[source]¶
GTZAN [Tzanetakis et al., 2001] dataset.
Note
Please see http://marsyas.info/downloads/datasets.html if you are planning to use this dataset to publish results.
Note
As of October 2022, the download link is not currently working. Setting
download=True
in GTZAN dataset will result in a URL connection error.- Parameters:
root (str or Path) – Path to the directory where the dataset is found or downloaded.
url (str, optional) – The URL to download the dataset from. (default:
"http://opihi.cs.uvic.ca/sound/genres.tar.gz"
)folder_in_archive (str, optional) – The top-level directory of the dataset.
download (bool, optional) – Whether to download the dataset if it is not found at root path. (default:
False
).subset (str or None, optional) – Which subset of the dataset to use. One of
"training"
,"validation"
,"testing"
orNone
. IfNone
, the entire dataset is used. (default:None
).