Flatten¶
- class torcheeg.transforms.Flatten(apply_to_baseline: bool = False)[source][source]¶
Flatten the input EEG representation.
from torcheeg import transforms t = transforms.Flatten() t(eeg=np.random.randn(62, 5))['eeg'].shape >>> (310,)
- __call__(*args, eeg: ndarray, baseline: ndarray | None = None, **kwargs) Dict[str, ndarray] [source][source]¶
- Parameters:
eeg (np.ndarray) – The input EEG signals.
baseline (np.ndarray, optional) – The corresponding baseline signal, if apply_to_baseline is set to True and baseline is passed, the baseline signal will be transformed with the same way as the experimental signal.
- Returns:
The transformed results.
- Return type:
np.ndarray