def forward(
        self, logits: torch.Tensor, target: torch.Tensor, mask: torch.Tensor
    ) -> torch.Tensor:
        """
        Calculates loss between ``logits`` and ``target`` tensors.

        Args:
            logits: model logits
            target: true targets
            mask: targets mask

        Returns:
            torch.Tensor: computed loss
        """
        loss = self.ce_loss.forward(logits, target)
        loss = torch.mean(loss[mask == 1])
        return loss

        Calculates loss between ``logits`` and ``target`` tensors.

        Args:
            logits: model logits
            target: true targets
            mask: targets mask

        Returns:
            torch.Tensor: computed loss
        
catalyst/contrib/losses/ce.py