def forward(self, outputs: torch.Tensor, targets: torch.Tensor) -> torch.Tensor:
        """Calculates loss between ``logits`` and ``target`` tensors."""
        loss = 0
        batch_size = len(outputs)
        for output_sample, target_sample in zip(outputs, targets):
            output_sample = torch.unsqueeze(output_sample, dim=0)
            target_sample = torch.unsqueeze(target_sample, dim=0)
            sample_loss = self.trevsky_loss(output_sample, target_sample)
            loss += sample_loss ** self.gamma
        loss = loss / batch_size  # mean over batch
        return loss
Calculates loss between ``logits`` and ``target`` tensors.
catalyst/contrib/losses/trevsky.py