mmlearn.tasks.contrastive_pretraining.LossPairSpec¶ class LossPairSpec(modalities, weight=1.0)[source]¶ Bases: object Specification for a pair of modalities to compute the contrastive loss. Methods Attributes modalities: tuple[str, str]¶ The pair of modalities to compute the contrastive loss between. weight: float = 1.0¶ The weight to apply to the contrastive loss for the pair of modalities.