def forward(self, outputs: torch.Tensor, targets: torch.Tensor) -> torch.Tensor:
        """Compute the loss.

        Args:
            outputs (torch.Tensor): predicted atoms, shape: [bs; num_atoms]
            targets (torch.Tensor): target atoms, shape: [bs; num_atoms]

        Returns:
            torch.Tensor: computed loss
        """
        atoms_diff = targets[:, None, :] - outputs[:, :, None]
        delta_atoms_diff = atoms_diff.lt(0).to(torch.float32).detach()
        huber_weights = (
            torch.abs(self.tau[None, :, None] - delta_atoms_diff) / self.num_atoms
        )
        loss = self.criterion(
            outputs[:, :, None], targets[:, None, :], huber_weights
        ).mean()
        return loss
Compute the loss.

        Args:
            outputs (torch.Tensor): predicted atoms, shape: [bs; num_atoms]
            targets (torch.Tensor): target atoms, shape: [bs; num_atoms]

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