Skip to content
Snippets Groups Projects
Commit 5a439f53 authored by Schneider Leo's avatar Schneider Leo
Browse files

fix : acc test

parent 2fa27c8b
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ def test_duo(model, data_test, loss_function, epoch):
img_ref = img_ref.cuda()
label = label.cuda()
pred_logits = model.forward(imaer,imana,img_ref)
pred_class = torch.argmax(pred_logits[:,0],dim=1)
pred_class = torch.argmax(pred_logits[:,0])
acc += (pred_class==label).sum().item()
loss = loss_function(pred_logits,label)
losses += loss.item()
......@@ -156,8 +156,8 @@ def make_prediction_duo(model, data, f_name, f_name2):
label = label.cuda()
output = model(imaer,imana,img_ref)
confidence_pred_list[specie].append(output[:,0].data.cpu().numpy())
#Mono class output (only most postive paire
output = torch.argmax(output[:,0],dim=1).data.cpu().numpy()
#Mono class output (only most postive paire)
output = torch.argmax(output[:,0]).data.cpu().numpy()
y_pred.extend(output)
label = torch.argmin(label).data.cpu().numpy()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment