From 70c64d51141328b5ff98532363c89999d36012bc Mon Sep 17 00:00:00 2001
From: Schneider Leo <leo.schneider@etu.ec-lyon.fr>
Date: Wed, 2 Apr 2025 11:43:37 +0200
Subject: [PATCH] fix : acc contrastive

---
 image_ref/main.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/image_ref/main.py b/image_ref/main.py
index dc6b1f60..80ee5e1a 100644
--- a/image_ref/main.py
+++ b/image_ref/main.py
@@ -153,18 +153,21 @@ def make_prediction_duo(model, data, f_name, f_name2):
         label = label.long()
         specie = torch.argmin(label)
 
+
         if torch.cuda.is_available():
             imaer = imaer.cuda()
             imana = imana.cuda()
             img_ref = img_ref.cuda()
             label = label.cuda()
         output = model(imaer,imana,img_ref)
+        print(output, label)
         confidence_pred_list[specie].append(output[:,0].data.cpu().numpy())
         #Mono class output (only most postive paire)
-        output = torch.argmax(output[:,0]).data.cpu().numpy()
+        output = torch.argmax(output[:,0])
+
         y_pred.extend(output)
 
-        label = torch.argmin(label).data.cpu().numpy()
+        label = torch.argmin(label)
         y_true.extend(label)  # Save Truth
     # constant for classes
 
-- 
GitLab