def regularization_loss(self, mean_anchor_probs: Tensor) -> Tensor:
        """Calculates the regularization loss with a power law target distribution.

        Args:
            mean_anchor_probs: The mean anchor probabilities.

        Returns:
            The calculated regularization loss.
        """
        power_dist = _power_law_distribution(
            size=mean_anchor_probs.shape[0],
            exponent=self.power_law_exponent,
            device=mean_anchor_probs.device,
        )
        loss = F.kl_div(
            input=mean_anchor_probs.log(), target=power_dist, reduction="sum"
        )
        return loss
Calculates the regularization loss with a power law target distribution.

        Args:
            mean_anchor_probs: The mean anchor probabilities.

        Returns:
            The calculated regularization loss.
        
lightly/loss/pmsn_loss.py