braindecode.augmentation.AugmentedDataLoader#

class braindecode.augmentation.AugmentedDataLoader(dataset, transforms=None, device=None, n_augmentation=0, **kwargs)[source]#

A base dataloader class customized to applying augmentation Transforms.

Parameters:
  • dataset (RecordDataset) – The dataset containing the signals.

  • transforms (list | Transform, optional) – Transform or sequence of Transform to be applied to each batch.

  • device (str | torch.device | None, optional) – Device on which to transform the data. Defaults to None.

  • n_augmentation (int, optional) – Number of augmented copies to append to each batch (fixed expansion). When 0 (default) the transforms are applied in place and the batch keeps its size (stochastic-per-epoch augmentation, backwards-compatible). When > 0 each batch becomes (1 + n_augmentation) times larger: the clean originals are kept and n_augmentation independently transformed copies are appended. This expresses augmentations defined as a fixed set-expansion (e.g. the EEG-Inception MI 6x training set, n_augmentation=5). In this mode batches are returned as (X, y).

  • **kwargs (dict, optional) – keyword arguments to pass to standard DataLoader class.

Examples using braindecode.augmentation.AugmentedDataLoader#

Data Augmentation on BCIC IV 2a Dataset

Data Augmentation on BCIC IV 2a Dataset

Searching the best data augmentation on BCIC IV 2a Dataset

Searching the best data augmentation on BCIC IV 2a Dataset