summaryrefslogtreecommitdiff
path: root/cli/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-21 01:12:53 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-21 01:12:53 +0100
commit7b742326d25a21c9c6f97766e0501ec0f5362099 (patch)
tree6b2e34c764f7a5ad5e81ca5b02b65391afce1d53 /cli/app
parent47e4c11b8c79ba737cc538af47b9a7caebaac18b (diff)
more aggressive stochastic clipping
Diffstat (limited to 'cli/app')
-rw-r--r--cli/app/search/search_class.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py
index 0c3fd29..921e586 100644
--- a/cli/app/search/search_class.py
+++ b/cli/app/search/search_class.py
@@ -193,9 +193,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 and (i % opt_clip_interval) == 0 and i < opt_steps * 0.45:
- sess.run(clip_latent, { clipped_alpha: (i / opt_steps) ** 2 })
- if opt_label_clipping and (i % opt_clip_interval) == 0 and i < opt_steps * 0.75:
+ if opt_stochastic_clipping and (i % opt_clip_interval) == 0: # and i < opt_steps * 0.45:
+ sess.run(clip_latent, { clipped_alpha: (i / opt_steps) * 2 })
+ if opt_label_clipping and (i % opt_clip_interval) == 0: # and i < opt_steps * 0.75:
sess.run(clip_labels, { normalized_alpha: (i / opt_steps) ** 2 })
if opt_video and opt_snapshot_interval != 0 and (i % opt_snapshot_interval) == 0:
phi_guess = sess.run(output)