towhee.models.mcprop.lossΒΆ

Functions

dot_sim

Cosine similarity between all the image and sentence pairs

Classes

Contrastive

Compute contrastive loss :param margin: margin :type margin: int :param measure: measure :type measure: bool :param max_violation: image feature dimension :type max_violation: int

ContrastiveLoss

Compute contrastive loss :param margin: margin :type margin: int :param max_violation: image feature dimension :type max_violation: int