summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-08 10:56:42 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-08 10:56:42 +0100
commitda243d0a0e00e8dd9f4ab3d3d5e973230b554347 (patch)
tree02d96a2c48787bb022166424f3c23c8ab30b571a
parent38307f80c20def125cf342c784d3aed3168cd839 (diff)
reprocess
-rw-r--r--cli/app/search/search_dense.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index 7c0c728..fe0c1aa 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -253,32 +253,32 @@ def find_dense_embedding_for_images(params):
gen_feat = gen_feat_ex["InceptionV3/Conv2d_1a_3x3"]
target_feat = target_feat_ex["InceptionV3/Conv2d_1a_3x3"]
feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1])
- feat_loss = tf.reduce_mean(feat_square_diff) * 0.15
- img_feat_err = tf.reduce_mean(feat_square_diff, axis=1) * 0.15
+ 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_2a_3x3"]
target_feat = target_feat_ex["InceptionV3/Conv2d_2a_3x3"]
feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1])
- feat_loss += tf.reduce_mean(feat_square_diff) * 0.15
- img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.15
+ 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_3b_1x1"]
- target_feat = target_feat_ex["InceptionV3/Conv2d_3b_1x1"]
- feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1])
- feat_loss += tf.reduce_mean(feat_square_diff) * 0.15
- img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.15
+ # gen_feat = gen_feat_ex["InceptionV3/Conv2d_3b_1x1"]
+ # target_feat = target_feat_ex["InceptionV3/Conv2d_3b_1x1"]
+ # 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
gen_feat = gen_feat_ex["InceptionV3/Conv2d_4a_3x3"]
target_feat = target_feat_ex["InceptionV3/Conv2d_4a_3x3"]
feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1])
- feat_loss += tf.reduce_mean(feat_square_diff) * 0.15
- img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.15
+ 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/Mixed_7a"]
target_feat = target_feat_ex["InceptionV3/Mixed_7a"]
feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1])
- feat_loss += tf.reduce_mean(feat_square_diff) * 0.4
- img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.4
+ feat_loss += tf.reduce_mean(feat_square_diff) * 0.25
+ img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) * 0.25
else:
feat_loss = tf.constant(0.0)