From 38307f80c20def125cf342c784d3aed3168cd839 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 8 Jan 2020 10:55:52 +0100 Subject: reprocess --- cli/app/search/search_class.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/app/search/search_class.py') diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py index 7961a0c..c732801 100644 --- a/cli/app/search/search_class.py +++ b/cli/app/search/search_class.py @@ -45,7 +45,7 @@ feature_layer_names = { } def find_nearest_vector_for_images(paths, opt_dims, opt_steps, opt_video, opt_tag, - opt_limit=-1, opt_stochastic_clipping=0, opt_label_clipping=0, + 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): tf.reset_default_graph() sess = tf.compat.v1.Session() @@ -186,9 +186,9 @@ def find_nearest_vector(sess, generator, opt_fp_in, opt_dims, out_images, out_la if i % 20 == 0: print('iter: {}, loss: {}'.format(i, curr_loss)) if i > 0: - if opt_stochastic_clipping != 0 and (i % opt_stochastic_clipping) == 0: + if opt_stochastic_clipping and (i % opt_clip_interval) == 0: sess.run(clip_latent) - if opt_label_clipping != 0 and (i % opt_label_clipping) == 0: + if opt_label_clipping and (i % opt_clip_interval) == 0: sess.run(clip_labels) if opt_video and opt_snapshot_interval != 0 and (i % opt_snapshot_interval) == 0: phi_guess = sess.run(output) -- cgit v1.2.3-70-g09d2