summaryrefslogtreecommitdiff
path: root/cli/app
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app')
-rw-r--r--cli/app/search/search_class.py4
-rw-r--r--cli/app/search/search_dense.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py
index 3a56f68..a41a141 100644
--- a/cli/app/search/search_class.py
+++ b/cli/app/search/search_class.py
@@ -87,8 +87,8 @@ def find_nearest_vector(sess, generator, opt_fp_in, opt_dims, out_images, out_la
z_initial = truncated_z_sample(batch_size, z_dim, truncation/2)
y_initial = create_labels_uniform(batch_size, vocab_size)
- input_z = tf.compat.v1.Variable(z_initial, dtype=np.float32, constraint=lambda t: tf.clip_by_value(t, -2, 2))
- input_y = tf.compat.v1.Variable(y_initial, dtype=np.float32, constraint=lambda t: tf.clip_by_value(t, 0, 1))
+ input_z = tf.compat.v1.Variable(z_initial, dtype=np.float32, constraint=lambda t: tf.clip_by_value(t, -2.5, 2.5))
+ input_y = tf.compat.v1.Variable(y_initial, dtype=np.float32, constraint=lambda t: tf.clip_by_value(t, -0.5, 1.5))
input_trunc = tf.compat.v1.constant(1.0)
output = generator({
'z': input_z,
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index 362e0ce..d5cbf64 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -246,8 +246,8 @@ def find_dense_embedding_for_images(params):
# feat_loss += tf.reduce_mean(feat_square_diff) * 0.25
# img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.25
- gen_feat = gen_feat_ex["InceptionV3/Conv2d_4a_3x3"]
- target_feat = target_feat_ex["InceptionV3/Conv2d_4a_3x3"]
+ gen_feat = gen_feat_ex["InceptionV3/Mixed_6a"]
+ target_feat = target_feat_ex["InceptionV3/Mixed_6a"]
feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1])
feat_loss += tf.reduce_mean(feat_square_diff) * 0.25
img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.25