From 3a5c6f0b281d445b0b5816bb6f639427763c4330 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 12 Dec 2019 14:46:16 +0100 Subject: all three layers of inception 7 --- inversion/image_inversion_inception.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'inversion') diff --git a/inversion/image_inversion_inception.py b/inversion/image_inversion_inception.py index 00d5e4d..6138684 100644 --- a/inversion/image_inversion_inception.py +++ b/inversion/image_inversion_inception.py @@ -226,17 +226,17 @@ if params.features: feat_loss = tf.reduce_mean(feat_square_diff) img_feat_err = tf.reduce_mean(feat_square_diff, axis=1) - gen_feat = gen_feat_ex["InceptionV3/Mixed_6a"] - target_feat = target_feat_ex["InceptionV3/Mixed_6a"] + gen_feat = gen_feat_ex["InceptionV3/Mixed_7b"] + target_feat = target_feat_ex["InceptionV3/Mixed_7b"] feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1]) feat_loss += tf.reduce_mean(feat_square_diff) img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) - # gen_feat = gen_feat_ex["InceptionV3/Mixed_5a"] - # target_feat = target_feat_ex["InceptionV3/Mixed_5a"] - # feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1]) - # feat_loss += tf.reduce_mean(feat_square_diff) - # img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) + gen_feat = gen_feat_ex["InceptionV3/Mixed_7c"] + target_feat = target_feat_ex["InceptionV3/Mixed_7c"] + feat_square_diff = tf.reshape(tf.square(gen_feat - target_feat), [BATCH_SIZE, -1]) + feat_loss += tf.reduce_mean(feat_square_diff) + img_feat_err += tf.reduce_mean(feat_square_diff, axis=1) else: feat_loss = tf.constant(0.0) -- cgit v1.2.3-70-g09d2