diff --git a/image_ref/main_ray.py b/image_ref/main_ray.py
index b06aa9bf2f1cda13305b876ab8c8f58787f1b8cf..d0ec7c066b0203e53280847e6acbcc6b734feb39 100644
--- a/image_ref/main_ray.py
+++ b/image_ref/main_ray.py
@@ -19,9 +19,9 @@ from ray.tune.schedulers import ASHAScheduler
 def train_model(config,args):
     # load data
 
-    if config['res_count_thr']=='none':
+    if config['ref_count_thr']=='none':
         ref_dir = '/lustre/fswork/projects/rech/bun/ucg81ws/these/pseudo_image/image_ref/img_ref'
-    elif config['res_count_thr']=='10':
+    elif config['ref_count_thr']=='10':
         ref_dir = '/lustre/fswork/projects/rech/bun/ucg81ws/these/pseudo_image/image_ref/img_ref_count_th_10'
     else :
         ref_dir = '/lustre/fswork/projects/rech/bun/ucg81ws/these/pseudo_image/image_ref/img_ref_count_th_5'