summaryrefslogtreecommitdiff
path: root/cli/app/search/search_dense.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/search/search_dense.py')
-rw-r--r--cli/app/search/search_dense.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index d5cbf64..5bf77fc 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -50,11 +50,10 @@ def find_dense_embedding_for_images(params):
SAMPLE_SIZE = params.sample_size
LOGS_DIR = os.path.join(params.path, LATENT_TAG, 'logs')
SAMPLES_DIR = os.path.join(params.path, LATENT_TAG, 'samples')
- VECTOR_DIR = os.path.join(params.path, 'vectors')
os.makedirs(LOGS_DIR, exist_ok=True)
os.makedirs(SAMPLES_DIR, exist_ok=True)
- os.makedirs(VECTOR_DIR, exist_ok=True)
+ os.makedirs(app_cfg.DIR_VECTORS, exist_ok=True)
def one_hot(values):
return np.eye(N_CLASS)[values]
@@ -426,7 +425,7 @@ def find_dense_embedding_for_images(params):
data = upload_bytes_to_cortex(params.folder_id, sample_fn + "-inverse.png", fp, "image/png")
if data is not None:
file_id = data['id']
- fp_out_pkl = os.path.join(vector_dir, "file_{}.pkl".format(file_id))
+ fp_out_pkl = os.path.join(app_cfg.DIR_VECTORS, "file_{}.pkl".format(file_id))
out_data = {
'id': file_id,
'sample_fn': sample_fn,