datasets.avmnist package
Submodules
datasets.avmnist.get_data module
Implements dataloaders for the AVMNIST dataset.
Here, the data is assumed to be in a folder titled “avmnist”.
- datasets.avmnist.get_data.get_dataloader(data_dir, batch_size=40, num_workers=8, train_shuffle=True, flatten_audio=False, flatten_image=False, unsqueeze_channel=True, generate_sample=False, normalize_image=True, normalize_audio=True)
Get dataloaders for AVMNIST.
- Parameters:
data_dir (str) – Directory of data.
batch_size (int, optional) – Batch size. Defaults to 40.
num_workers (int, optional) – Number of workers. Defaults to 8.
train_shuffle (bool, optional) – Whether to shuffle training data or not. Defaults to True.
flatten_audio (bool, optional) – Whether to flatten audio data or not. Defaults to False.
flatten_image (bool, optional) – Whether to flatten image data or not. Defaults to False.
unsqueeze_channel (bool, optional) – Whether to unsqueeze any channels or not. Defaults to True.
generate_sample (bool, optional) – Whether to generate a sample and save it to file or not. Defaults to False.
normalize_image (bool, optional) – Whether to normalize the images before returning. Defaults to True.
normalize_audio (bool, optional) – Whether to normalize the audio before returning. Defaults to True.
- Returns:
Tuple of (training dataloader, validation dataloader, test dataloader)
- Return type:
tuple