pred_labels = logits_tensor.detach().cpu().numpy()
         metrics = metric.compute(
             predictions=pred_labels,
             references=labels,
             num_labels=num_labels,
             ignore_index=255,
             reduce_labels=False,
         )
         for key, value in metrics.items():
             if isinstance(value, np.ndarray):
                 metrics[key] = value.tolist()
         return metrics