-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
51 lines (39 loc) · 1.65 KB
/
config.py
File metadata and controls
51 lines (39 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# adjust your paths here. Recommended to keep it that way in order not to run into git conflicts
BASE_PATH = ''
PATH_TO_FEATURES = {
'humor': os.path.join(BASE_PATH, 'c1_muse_humor/feature_segments'),
'reaction': os.path.join(BASE_PATH, 'c2_muse_reaction/feats'),
'stress': os.path.join(BASE_PATH, 'path/to/your/features')
}
# humor is labelled every 2s, but features are extracted every 500ms
N_TO_1_TASKS = {'humor', 'reaction'}
ACTIVATION_FUNCTIONS = {
'humor': torch.nn.Sigmoid,
'reaction': torch.nn.Sigmoid,
'stress':torch.nn.Tanh
}
NUM_TARGETS = {
'humor': 1,
'reaction': 7,
'stress': 1
}
PATH_TO_LABELS = {
'humor': os.path.join(BASE_PATH, 'c1_muse_humor/label_segments'),
'reaction': os.path.join(BASE_PATH, 'c2_muse_reaction'),
'stress': os.path.join(BASE_PATH, 'c3_muse_stress_2022/label_segments')
}
PATH_TO_METADATA = {
'humor': os.path.join(BASE_PATH, 'c1_muse_humor/metadata'),
'reaction':os.path.join(BASE_PATH, 'c2_muse_reaction'),
'stress': os.path.join(BASE_PATH, 'c3_muse_stress_2022/metadata')
}
PARTITION_FILES = {task: os.path.join(path_to_meta, 'partition.csv') for task,path_to_meta in PATH_TO_METADATA.items()}
REACTION_LABELS = ['Adoration', 'Amusement', 'Anxiety', 'Disgust', 'Empathic-Pain', 'Fear', 'Surprise']
OUTPUT_PATH = os.path.join(BASE_PATH, 'results_fusion')
LOG_FOLDER = os.path.join(OUTPUT_PATH, 'log_muse')
DATA_FOLDER = os.path.join(OUTPUT_PATH, 'data_muse')
MODEL_FOLDER = os.path.join(OUTPUT_PATH, 'model_muse')
PREDICTION_FOLDER = os.path.join(OUTPUT_PATH, 'prediction_muse')