Просмотр исходного кода

Merge: [nnUNet/TF2] Log best metric at the end of training

Krzysztof Kudrynski 3 лет назад
Родитель
Сommit
9e542797df
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      TensorFlow2/Segmentation/nnUNet/runtime/run.py

+ 1 - 1
TensorFlow2/Segmentation/nnUNet/runtime/run.py

@@ -207,7 +207,7 @@ def train(args, model, dataset, logger):
         metrics = {
             "train_loss": round(total_train_loss / steps_per_epoch, 5),
             "val_loss": round(1 - float(dice_score), 5),
-            "dice": round(float(dice_metrics.metrics["value"]), 5),
+            "dice": round(float(dice_metrics.metrics["max"].result()), 5),
         }
         logger.log_metrics(metrics=metrics)
         logger.flush()