summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-02-11 21:51:13 +0100
committerJules Laplace <julescarbon@gmail.com>2020-02-11 21:51:13 +0100
commit4d73ea0f784afbd2286f4275376b16cfc9e969ae (patch)
tree3dfa7a6bc7ec18b758707397505173346286c96b
parente7eee229ef49dc109ff7229e18279fd295cd8044 (diff)
adding mse loss terms
-rw-r--r--cli/app/search/search_dense.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index ca91943..664754a 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -216,10 +216,10 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op
feat_loss_d, feat_err_d = feature_loss(feature_extractor, opt_feature_layers, BATCH_SIZE, gen_img_ch, target_img_ch, img_w - width, img_w - width, height, width)
feat_loss_e, feat_err_e = feature_loss(feature_extractor, opt_feature_layers, BATCH_SIZE, gen_img_ch, target_img_ch, int((img_w - width) / 2), int((img_w - width) / 2), height, width)
- mse_loss_a = mse_loss_crop(target_img, gen_img, 0, 0, height / 2, width / 2)
- mse_loss_b = mse_loss_crop(target_img, gen_img, height / 2, 0, height / 2, width / 2)
- mse_loss_c = mse_loss_crop(target_img, gen_img, 0, width / 2, height / 2, width / 2)
- mse_loss_d = mse_loss_crop(target_img, gen_img, height / 2, width / 2, height / 2, width / 2)
+ mse_loss_a = mse_loss_crop(target_img, gen_img, 0, 0, img_w / 2, img_w / 2)
+ mse_loss_b = mse_loss_crop(target_img, gen_img, img_w / 2, 0, img_w / 2, img_w / 2)
+ mse_loss_c = mse_loss_crop(target_img, gen_img, 0, img_w / 2, img_w / 2, img_w / 2)
+ mse_loss_d = mse_loss_crop(target_img, gen_img, img_w / 2, img_w / 2, img_w / 2, img_w / 2)
feat_loss_quad = feat_loss_a + feat_loss_b + feat_loss_c + feat_loss_d + feat_loss_e
img_feat_err_quad = feat_err_a + feat_err_b + feat_err_c + feat_err_d + feat_err_e