From a2fb78bc4fa1d0781d0a2d3e2f330707dc42c8c9 Mon Sep 17 00:00:00 2001
From: NBouteldja <40466985+NBouteldja@users.noreply.github.com>
Date: Thu, 5 Aug 2021 01:59:16 +0200
Subject: [PATCH] Update test.py

---
 test.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/test.py b/test.py
index 34ab746..0ab2cbe 100644
--- a/test.py
+++ b/test.py
@@ -101,13 +101,12 @@ for s, stain in enumerate(stainsToValidate):
                 for i in range(numberClassesToEvaluate):
                     classEvaluators[s][i].add_example(classInstancePredictionList[i], classInstanceGTList[i])
 
-            prediction = torch.softmax(prediction, 1)
             STAIN_to_PAS_img = STAIN_to_PAS_img.flip(2)
-            prediction += torch.softmax(segModel(STAIN_to_PAS_img), 1).flip(2)
+            prediction += segModel(STAIN_to_PAS_img).flip(2)
             STAIN_to_PAS_img = STAIN_to_PAS_img.flip(3)
-            prediction += torch.softmax(segModel(STAIN_to_PAS_img), 1).flip(3).flip(2)
+            prediction += segModel(STAIN_to_PAS_img).flip(3).flip(2)
             STAIN_to_PAS_img = STAIN_to_PAS_img.flip(2)
-            prediction += torch.softmax(segModel(STAIN_to_PAS_img), 1).flip(3)
+            prediction += segModel(STAIN_to_PAS_img).flip(3)
             STAIN_to_PAS_img = STAIN_to_PAS_img.flip(3)
             prediction /= 4.
 
-- 
GitLab