def __init__(
        self, tau: float, reduction: str = "mean", pos_aggregation="in"
    ) -> None:
        """
        Args:
            tau: temperature
            reduction: specifies the reduction to apply to the output:
                ``"none"`` | ``"mean"`` | ``"sum"``.
                ``"none"``: no reduction will be applied,
                ``"mean"``: the sum of the output will be divided by the number of
                positive pairs in the output,
                ``"sum"``: the output will be summed.
            pos_aggregation: specifies the place of positive pairs aggregation:
                ``"in"`` | ``"out"``.
                ``"in"``: maximization of log(average positive exponentiate similarity)
                ``"out"``: maximization of average positive similarity

        Raises:
            ValueError: if reduction is not mean, sum or none
            ValueError: if positive aggregation is not in or out
        """
        super().__init__()
        self.tau = tau
        self.self_similarity = 1 / self.tau
        self.exp_self_similarity = e ** (1 / self.tau)
        self.reduction = reduction
        self.pos_aggregation = pos_aggregation

        if self.reduction not in ["none", "mean", "sum"]:
            raise ValueError(
                f"Reduction should be: mean, sum, none. But got - {self.reduction}!"
            )
        if self.pos_aggregation not in ["in", "out"]:
            raise ValueError(
                "Positive aggregation should be: in or out."
                f"But got - {self.pos_aggregation}!"
            )

        Args:
            tau: temperature
            reduction: specifies the reduction to apply to the output:
                ``"none"`` | ``"mean"`` | ``"sum"``.
                ``"none"``: no reduction will be applied,
                ``"mean"``: the sum of the output will be divided by the number of
                positive pairs in the output,
                ``"sum"``: the output will be summed.
            pos_aggregation: specifies the place of positive pairs aggregation:
                ``"in"`` | ``"out"``.
                ``"in"``: maximization of log(average positive exponentiate similarity)
                ``"out"``: maximization of average positive similarity

        Raises:
            ValueError: if reduction is not mean, sum or none
            ValueError: if positive aggregation is not in or out
        
catalyst/contrib/losses/supervised_contrastive.py