mmlearn.datasets.core.modalities.Modality¶
- class Modality(name, modality_specific_properties=None)[source]¶
Bases:
object
A representation of a modality in the library.
This class is used to represent a modality in the library. It contains the name of the modality and the properties that can be associated with it. The properties are dynamically generated based on the name of the modality and can be accessed as attributes of the class.
- Parameters:
- Raises:
ValueError – If the property already exists for the modality or if the format string is invalid.
Methods
Attributes
- add_property(name, format_string)[source]¶
Add a new property to the modality.
- Parameters:
- Warns:
UserWarning – If the property already exists for the modality. It will overwrite the existing property.
- Raises:
ValueError – If format_string is invalid. A valid format string contains at least one placeholder enclosed in curly braces.
- Return type:
-
ema_embedding:
str
¶ Embedding from an Exponential Moving Average (EMA) encoder associated with the modality.