From ed1f9b0d15adc90d1ba4f477dc56656e1c87f01a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 18 Feb 2020 19:37:22 +0100 Subject: try intense rescaling, way more mse --- cli/app/search/search_dense.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/app/search/search_dense.py') diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py index a2bdad3..7e144c8 100644 --- a/cli/app/search/search_dense.py +++ b/cli/app/search/search_dense.py @@ -192,7 +192,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op # Mse loss for image comparison. if params.mse: pix_square_diff = tf.square((target_img - gen_img) / 2.0) - mse_loss = tf.reduce_mean(pix_square_diff) + mse_loss = tf.reduce_mean(pix_square_diff) # , axis=1) img_mse_err = tf.reduce_mean(pix_square_diff, axis=[1,2,3]) else: mse_loss = tf.constant(0.0) @@ -263,7 +263,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op feat_loss_vgg, img_feat_err_vgg = feature_loss_vgg(feature_extractor, opt_feature_layers, BATCH_SIZE, gen_img_ch, target_img_ch, None, None, height, width) - feat_loss = feat_loss_vgg + feat_loss_inception + feat_loss = feat_loss_vgg + 10.0 * feat_loss_inception # mse_loss_a = mse_loss_crop(target_img_ch, gen_img_ch, 0, 0, img_w / 2, img_w / 2) # mse_loss_b = mse_loss_crop(target_img_ch, gen_img_ch, img_w / 2, 0, img_w / 2, img_w / 2) @@ -301,7 +301,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op # img_feat_err_quint = tf.constant(0.0) # img_rec_err = params.lambda_mse * img_mse_err + params.lambda_feat * img_feat_err - inv_loss = (params.lambda_mse * mse_loss + params.lambda_feat * feat_loss) + inv_loss = 100.0 * mse_loss + feat_loss # inv_loss_quad = (params.lambda_mse * mse_loss_quad + params.lambda_feat * feat_loss_quad) # inv_loss_quint = params.lambda_mse * mse_loss_quint + params.lambda_feat * feat_loss_quint -- cgit v1.2.3-70-g09d2