import numpy as np
import torch
from torch import nn
def compute_metrics(eval_pred):
     with torch.no_grad():
         logits, labels = eval_pred
         logits_tensor = torch.from_numpy(logits)
         logits_tensor = nn.functional.interpolate(
             logits_tensor,
             size=labels.shape[-2:],
             mode="bilinear",
             align_corners=False,
         ).argmax(dim=1)