-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaths.py
35 lines (23 loc) · 917 Bytes
/
paths.py
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
# -*- coding:utf-8 -*-
import os
def check(dirname):
"""This function creates a directory
in case it doesn't exist"""
if not os.path.exists(dirname):
os.makedirs(dirname)
return dirname
# The project directory
EVAL_DIR = os.path.dirname(os.path.realpath(__file__))
# Folder with datasets
#DATASETS_ROOT = check(os.path.join(EVAL_DIR, 'Datasets'))
DATASETS_ROOT = check('/home/ubuntu2/exme/dataset')
# Where the checkpoints are stored
CKPT_ROOT = check(os.path.join(EVAL_DIR, 'archive/'))
# Where the logs are stored
LOGS = check(os.path.join(EVAL_DIR, 'Logs/Experiments/'))
# Where the algorithms visualizations are dumped
RESULTS_DIR = check(os.path.join(EVAL_DIR, 'Results/'))
# Where the imagenet weights are located
INIT_WEIGHTS_DIR = check(os.path.join(EVAL_DIR, 'Weights_imagenet/'))
# Where the demo images are located
DEMO_DIR = check(os.path.join(EVAL_DIR, 'Demo/test/'))