summaryrefslogtreecommitdiff
path: root/cli/app/search/search_class.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/search/search_class.py')
-rw-r--r--cli/app/search/search_class.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py
index 40801d6..0c3fd29 100644
--- a/cli/app/search/search_class.py
+++ b/cli/app/search/search_class.py
@@ -48,7 +48,8 @@ feature_layer_names = {
def find_nearest_vector_for_images(paths, opt_dims, opt_steps, opt_video, opt_tag,
opt_limit=-1, opt_stochastic_clipping=True, opt_label_clipping=True,
- opt_use_feature_detector=False, opt_feature_layers=[1,2,4,7], opt_snapshot_interval=20, opt_clip_interval=500):
+ opt_use_feature_detector=False, opt_feature_layers=[1,2,4,7], opt_snapshot_interval=20, opt_clip_interval=500,
+ opt_folder_id=59):
tf.reset_default_graph()
sess = tf.compat.v1.Session()
print("Initializing generator...")
@@ -57,7 +58,7 @@ def find_nearest_vector_for_images(paths, opt_dims, opt_steps, opt_video, opt_ta
fp_inverses = os.path.join(app_cfg.DIR_INVERSES, opt_tag)
os.makedirs(fp_inverses, exist_ok=True)
# save_params_latent(fp_inverses, opt_tag)
- save_params_dense(fp_inverses, opt_tag)
+ save_params_dense(fp_inverses, opt_tag, folder_id=opt_folder_id)
out_file = h5py.File(join(fp_inverses, 'dataset.latent.hdf5'), 'w')
out_images = out_file.create_dataset('xtrain', (len(paths), 3, 512, 512,), dtype='float32')
out_labels = out_file.create_dataset('ytrain', (len(paths), 1000,), dtype='float32')