neuraltrain.augmentations.augmentations.TrivialBrainAugment

class neuraltrain.augmentations.augmentations.TrivialBrainAugment(cfg: TrivialBrainAugmentConfig)[source][source]

Inspired by TrivialAugment [1], sample augmentations and strength randomly on each minibatch/forward pass.

Parameters:

config (Configuration that contains values for:) – sfreq: Sampling frequency of the recording min_max_ch_drop: Min/Max for linspace of channel dropout probabilities min_max_gauss_noise: Min/Max for linspace of gaussian noise standard deviation min_max_time_mask: Min/Max for logspace of length of timeblock to be masked min_max_bandstop: Min/Max for logspace of frequency width of bandstop filter min_max_freq_shift: Min/Max for linspace of frequency shift

References

forward(x: Tensor) Tensor[source][source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.