diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-02-11 19:06:37 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-02-11 19:06:37 +0100 |
| commit | 1fc1e2c4922e8d47ff0bcdce08e3e2d1850f3d44 (patch) | |
| tree | 27e2828c6c88343de57414035a83643a33e58114 | |
| parent | 530bf33a017a59b5d7b987bd665a35abb18d403d (diff) | |
try g(z) encoding and label embedding
| -rw-r--r-- | cli/app/search/json.py | 4 | ||||
| -rw-r--r-- | cli/app/search/search_dense.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cli/app/search/json.py b/cli/app/search/json.py index 35a9daf..83893c8 100644 --- a/cli/app/search/json.py +++ b/cli/app/search/json.py @@ -67,8 +67,8 @@ def make_params_dense(tag, folder_id): "clipping": False, "path": os.path.join(app_cfg.DIR_INVERSES, tag), "dataset": os.path.join(app_cfg.DIR_INVERSES, tag, "dataset.latent.hdf5"), - # "inv_layer": "Generator_2/G_Z/Reshape:0", - "inv_layer": "latent", + "inv_layer": "Generator_2/G_Z/Reshape:0", + # "inv_layer": "latent", "decay_lr": True, "inv_it": 10000, "generator_path": "https://tfhub.dev/deepmind/biggan-512/2", diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py index 458d5b8..4d59da9 100644 --- a/cli/app/search/search_dense.py +++ b/cli/app/search/search_dense.py @@ -227,7 +227,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op 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_quad = params.lambda_mse * mse_loss + params.lambda_feat * feat_loss_quad + inv_loss_quad = 5.0 * mse_loss + params.lambda_feat * feat_loss_quad # -------------------------- # Optimizer. |
