Shortcuts

HorizontalFlip

class torcheeg.transforms.HorizontalFlip(location_dict: dict | None, channel_dim: int = 0)[source][source]

Flip the EEG signal horizontally based on the electrode’s position.

from torcheeg import transforms
from torcheeg.datasets.constants.motor_imagery import BCICIV2A_LOCATION_DICT

eeg = np.random.randn(32, 4, 22, 128)
t = transforms.HorizontalFlip(
    location_dict=BCICIV2A_LOCATION_DICT,
    channel_dim=2
)
t(eeg=eeg)['eeg'].shape
>>> (32, 4, 22, 128)
Parameters:
  • location_dict (dict) – The dict of electrodes and their postions.

  • channel_dim (int) – The dim of electrodes in EEG data.

__call__(*args, **kwargs) Dict[str, any][source]

Call self as a function.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources