def __init__(
        self, num_classes: int, normalize: bool = False, compute_on_call: bool = True
    ):
        """Constructs a confusion matrix for a multiclass classification problems."""
        super().__init__(compute_on_call=compute_on_call)
        self.num_classes = num_classes
        self.normalize = normalize
        self.conf = np.ndarray((num_classes, num_classes), dtype=np.int32)
        self._ddp_backend = None
        self.reset()
Constructs a confusion matrix for a multiclass classification problems.
catalyst/metrics/_confusion_matrix.py