def __init__(
        self,
        lambda_param: float = 25.0,
        mu_param: float = 25.0,
        nu_param: float = 1.0,
        alpha: float = 0.75,
        gather_distributed: bool = False,
        eps: float = 0.0001,
        num_matches: Tuple[int, int] = (20, 4),
    ):
        """Initializes the VICRegL loss module with the specified parameters.

        Raises:
            ValueError: If gather_distributed is True but torch.distributed is not available.
        """
        super(VICRegLLoss, self).__init__()
        self.alpha = alpha
        self.num_matches = num_matches
        self.lambda_param = lambda_param
        self.mu_param = mu_param
        self.nu_param = nu_param
        self.eps = eps
        self.gather_distributed = gather_distributed
        # Note: We multiply nu_param by 0.5 because the implementations of the VICReg
        # covariance loss differ by a factor of 0.5 between the original VICReg and
        # VICRegL codebases. See:
        # - VICReg: https://github.com/facebookresearch/vicreg/blob/4e12602fd495af83efd1631fbe82523e6db092e0/main_vicreg.py#L211-L213
        # - VICRegL: https://github.com/facebookresearch/VICRegL/blob/803ae4c8cd1649a820f03afb4793763e95317620/main_vicregl.py#L308-L312
        self.vicreg_loss = VICRegLoss(
            lambda_param=lambda_param,
            mu_param=mu_param,
            nu_param=0.5 * nu_param,
            eps=eps,
            gather_distributed=gather_distributed,
        )
Initializes the VICRegL loss module with the specified parameters.

        Raises:
            ValueError: If gather_distributed is True but torch.distributed is not available.
        
lightly/loss/vicregl_loss.py