Shortcuts

Multilabel

class torcheeg.transforms.Multilabel(transforms: ~typing.List[~torcheeg.transforms.base_transform.LabelTransform], type_fn: ~typing.Callable | None = <class 'list'>)[source][source]

Apply multiple label transforms independently and combine their results into a list.

from torcheeg import transforms

t = transforms.Multilabel([
    transforms.Compose([
        transforms.Select('valence'),
        transforms.Binary(5.0)
    ]),
    transforms.Select('subject_id')
])
t(y={'valence': 4.5, 'arousal': 5.5, 'subject_id': 7})['y']
>>> [0, 7]
Parameters:

transforms (list) – A list of transforms to be applied independently.

__call__(*args, y: Dict, **kwargs) Dict[source][source]
Parameters:

y (dict) – A dictionary containing the input labels.

Returns:

A dictionary containing the processed labels as a list.

Return type:

dict

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