def _global_loss(
        self,
        global_view_features: Sequence[Tuple[Tensor, Tensor]],
        local_view_features: Optional[Sequence[Tuple[Tensor, Tensor]]] = None,
    ) -> Tensor:
        """Returns global features loss.

        Args:
        global_view_features:
                Sequence of (global_features, local_features)
                tuples from the global crop views.
        local_view_features:
                Sequence of (global_features,local_features)
                tuples from the local crop views.

        Returns:
            The computed global features loss.
        """
        inv_loss = self._global_invariance_loss(
            global_view_features=global_view_features,
            local_view_features=local_view_features,
        )
        var_loss, cov_loss = self._global_variance_and_covariance_loss(
            global_view_features=global_view_features,
            local_view_features=local_view_features,
        )
        return (
            self.lambda_param * inv_loss
            + self.mu_param * var_loss
            + self.nu_param * cov_loss
        )
Returns global features loss.

        Args:
        global_view_features:
                Sequence of (global_features, local_features)
                tuples from the global crop views.
        local_view_features:
                Sequence of (global_features,local_features)
                tuples from the local crop views.

        Returns:
            The computed global features loss.
        
lightly/loss/vicregl_loss.py