diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-07 18:18:38 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-07 18:18:38 +0100 |
| commit | 45855c051f415e56306f116a921eefe284139694 (patch) | |
| tree | cbdd76fe4f7f3da4f44e2044ba03184a913aa512 /cli/app/search/search_class.py | |
| parent | 151ade996065ad02c2d96b723c94589066491d54 (diff) | |
fetch list of images and dedupe
Diffstat (limited to 'cli/app/search/search_class.py')
| -rw-r--r-- | cli/app/search/search_class.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py index eb9ff42..eba61e8 100644 --- a/cli/app/search/search_class.py +++ b/cli/app/search/search_class.py @@ -26,7 +26,7 @@ from app.search.vector import truncated_z_sample, truncated_z_single, \ def find_nearest_vector_for_images(opt_fp_in, opt_dims, opt_steps, opt_limit, opt_video, opt_tag): sess = tf.compat.v1.Session() - + tf.reset_default_graph() generator = hub.Module('https://tfhub.dev/deepmind/biggan-512/2') if os.path.isdir(opt_fp_in): @@ -52,6 +52,7 @@ def find_nearest_vector_for_images(opt_fp_in, opt_dims, opt_steps, opt_limit, op fp_frames = find_nearest_vector(sess, generator, path, opt_dims, out_images, out_labels, out_latent, opt_steps, index) if opt_video: export_video(fp_frames) + sess.close() def find_nearest_vector(sess, generator, opt_fp_in, opt_dims, out_images, out_labels, out_latent, opt_steps, index): """ |
