def regularization_loss(self, mean_anchor_probs: Tensor) -> Tensor:
        """Calculates mean entropy regularization loss.

        Args:
            mean_anchor_probs: The mean anchor probabilities.

        Returns:
            The calculated regularization loss.
        """
        loss = -torch.sum(torch.log(mean_anchor_probs ** (-mean_anchor_probs)))
        loss += math.log(float(len(mean_anchor_probs)))
        return loss
Calculates mean entropy regularization loss.

        Args:
            mean_anchor_probs: The mean anchor probabilities.

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