Performance, Pytorch, Deep Learning, Artificial Intelligence, Tensorboard.
of unique labels. This can be calculated by applying the torch.sort op on the flattened target tensor and counting the number of steps in the resultant step function. def forward(self, pred: Tensor, target: Tensor) -> Tensor: # ignore background labels target = self.ignore_background(target) # sort