diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-02-18 19:37:22 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-02-18 19:37:22 +0100 |
| commit | ed1f9b0d15adc90d1ba4f477dc56656e1c87f01a (patch) | |
| tree | 22d59d77ca25e70bddcd0225857d916d07678013 /cli | |
| parent | 0a696fed6b5e9379fe15d3643fccb50ed27de88a (diff) | |
try intense rescaling, way more mse
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/app/search/search_dense.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
