diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-08 10:55:52 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-08 10:55:52 +0100 |
| commit | 38307f80c20def125cf342c784d3aed3168cd839 (patch) | |
| tree | a463dd40bcdda739e8f0b5670aa711244e4bf597 /cli/app/search/search_class.py | |
| parent | 33a81c019dc39122189fb1dac6e9186ac08382d3 (diff) | |
reprocess
Diffstat (limited to 'cli/app/search/search_class.py')
| -rw-r--r-- | cli/app/search/search_class.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
