quaterion.loss.similarity_loss module
- class SimilarityLoss(distance_metric_name: Distance = Distance.COSINE)[source]
Bases:
Module
Base similarity losses class.
- Parameters:
distance_metric_name – Name of the distance function, e.g.,
Distance
.
- get_config_dict() Dict[str, Any] [source]
Config used in saving and loading purposes.
Config object has to be JSON-serializable.
- Returns:
Dict[str, Any] – JSON-serializable dict of params