Shortcuts

Select

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

Select part of the value from the information dictionary.

from torcheeg import transforms

t = transforms.Select(key='valence')
t(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.

from torcheeg import transforms

t = transforms.Select(key=['valence', 'arousal'])
t(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) 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

Read the Docs v: latest
Versions
latest
stable
v1.1.1
v1.1.0
v1.0.11
v1.0.10
v1.0.9
v1.0.8.post1
v1.0.8
v1.0.7
v1.0.6
v1.0.4
v1.0.3
v1.0.2
v1.0.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.

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