(self, weights, *args)
return weights.max(dim=1)[0]
Compute largest weight.

        Parameters
        ----------
        weights : torch.Tensor
            Tensor of shape `(n_samples, n_assets)` representing the predicted weights by our portfolio optimizer.

        args : list
            Additional arguments. Just used for compatibility. Not used.

        Returns
        -------
        torch.Tensor
            Tensor of shape `(n_samples,)` representing the per sample largest weight.
Compute largest weight.
Compute largest weight .
def __call__(self, weights, *args):
        """Compute largest weight.

        Parameters
        ----------
        weights : torch.Tensor
            Tensor of shape `(n_samples, n_assets)` representing the predicted weights by our portfolio optimizer.

        args : list
            Additional arguments. Just used for compatibility. Not used.

        Returns
        -------
        torch.Tensor
            Tensor of shape `(n_samples,)` representing the per sample largest weight.

        """
        return weights.max(dim=1)[0]
def __call__ ( self , weights , * args ) : return weights . max ( dim = 1 ) [ 0 ]