def compute_metrics(eval_pred):
     logits, labels = eval_pred
     logits = tf.transpose(logits, perm=[0, 2, 3, 1])
     logits_resized = tf.image.resize(
         logits,
         size=tf.shape(labels)[1:],
         method="bilinear",
     )