def __init__(self, n_classes: int, by_classes=False):
    super().__init__(compute_on_step=False)
    self._n_classes = n_classes
    self.fp_list_by_classes = [[] for _ in range(n_classes)]
    self.tp_list_by_classes = [[] for _ in range(n_classes)]
    self.score_list_by_classes = [[] for _ in range(n_classes)]
    self.num_annotations_by_classes = [0 for _ in range(n_classes)]
    self._by_classes = by_classes
def __init__(self, n_classes: int, by_classes=False):
    super().__init__(compute_on_step=False)
    self._n_classes = n_classes
    self.fp_list_by_classes = [[] for _ in range(n_classes)]
    self.tp_list_by_classes = [[] for _ in range(n_classes)]
    self.score_list_by_classes = [[] for _ in range(n_classes)]
    self.num_annotations_by_classes = [0 for _ in range(n_classes)]
    self._by_classes = by_classes