From 2c86b2b300531e3dfa4265c87e86eb3cab3f3a21 Mon Sep 17 00:00:00 2001
From: Paul Best <paul.best@lis-lab.fr>
Date: Thu, 14 Dec 2023 17:30:11 +0100
Subject: [PATCH] fix weights relative path

---
 run_CNN.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/run_CNN.py b/run_CNN.py
index cdeca01..218c066 100644
--- a/run_CNN.py
+++ b/run_CNN.py
@@ -58,7 +58,7 @@ class Dataset(torch.utils.data.Dataset):
 
 # prepare model
 model = models.get[args.specie]['archi']
-model.load_state_dict(torch.load(f"{os.path.dirname(__file__)}/weights/{models.get[args.specie]['weights']}"))
+model.load_state_dict(torch.load(f".{os.path.dirname(__file__)}/weights/{models.get[args.specie]['weights']}"))
 model.eval()
 device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 model.to(device)
-- 
GitLab