1
0
Quellcode durchsuchen

Feat: 修改数据文件夹结构

dk vor 1 Jahr
Ursprung
Commit
847f27f815
2 geänderte Dateien mit 5 neuen und 6 gelöschten Zeilen
  1. 2 2
      backend/training.py
  2. 3 4
      backend/validation.py

+ 2 - 2
backend/training.py

@@ -111,10 +111,10 @@ if __name__ == '__main__':
     model_type = 'baseline'
     # TODO: load subject config
 
-    data_dir = f'./data/{subj_name}/train/'
+    data_dir = f'./data/{subj_name}/'
     model_dir = './static/models/'
 
-    with open(os.path.join(data_dir, 'info.yml'), 'r') as f:
+    with open(os.path.join(data_dir, 'train_info.yml'), 'r') as f:
         info = yaml.safe_load(f)
     sessions = info['sessions']
     event_id = {'rest': 0}

+ 3 - 4
backend/validation.py

@@ -104,10 +104,9 @@ if __name__ == '__main__':
     subj_name = 'ylj'
     # TODO: load subject config
 
-    data_dir = f'./data/{subj_name}/train/'
-    model_path = f'./static/models/{subj_name}/baseline_rest+cylinder_11-16-2023-16-38-32.pkl'
-
-    with open(os.path.join(data_dir, 'info.yml'), 'r') as f:
+    data_dir = f'./data/{subj_name}/'
+    model_path = f'./static/models/{subj_name}/baseline_rest+cylinder_11-19-2023-17-31-18.pkl'
+    with open(os.path.join(data_dir, 'val_info.yml'), 'r') as f:
         info = yaml.safe_load(f)
     sessions = info['sessions']
     event_id = {'rest': 0}