Shortcuts

Select

class torcheeg.transforms.Select(key: Union[str, List])[source][source]

Select part of the value from the information dictionary.

transform = Select(key='valence')
transform(y={'valence': 4.5, 'arousal': 5.5, 'subject_id': 7})['y']
>>> 4.5

Select allows multiple values to be selected and returned as a list. Suitable for multi-classification tasks or multi-task learning.

transform = Select(key=['valence', 'arousal'])
transform(y={'valence': 4.5, 'arousal': 5.5, 'subject_id': 7})['y']
>>> [4.5, 5.5]
Parameters

key (str or list) – The selected key can be a key string or a list of keys.

__call__(*args, y: Dict, **kwargs) Union[int, float, List][source][source]
Parameters

y (dict) – A dictionary describing the EEG signal samples, usually as the last return value for each sample in Dataset.

Returns

Selected value or selected value list.

Return type

str or list

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