From 078b03ffa9a5fcd57315ef767c3dc4166761d590 Mon Sep 17 00:00:00 2001 From: dmitrysarov Date: Wed, 9 Jan 2019 15:01:42 +0300 Subject: [PATCH] index + 1 in average Former-commit-id: 1dc82b17f075a74f7ef6b20c888835497bcd690b --- eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.py b/eval.py index 1aada5e..c727510 100644 --- a/eval.py +++ b/eval.py @@ -23,4 +23,4 @@ def eval_net(net, dataset, gpu=False): mask_pred = (mask_pred > 0.5).float() tot += dice_coeff(mask_pred, true_mask).item() - return tot / i + return tot / (i + 1)