diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-02-10 18:48:15 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-02-10 18:48:15 +0100 |
| commit | 8197048ae7b33ce27a810ed43ea188f3815c0f5b (patch) | |
| tree | 8c07a69f014df7afa00a20485597177c15e12932 /cli | |
| parent | 67e5e02456ff796dba4601d0305fbc08e358cce9 (diff) | |
feature loss on quadrants
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/app/commands/biggan/extract_dense_vectors.py | 2 | ||||
| -rw-r--r-- | cli/app/search/search_class.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cli/app/commands/biggan/extract_dense_vectors.py b/cli/app/commands/biggan/extract_dense_vectors.py index e8f0587..54f9762 100644 --- a/cli/app/commands/biggan/extract_dense_vectors.py +++ b/cli/app/commands/biggan/extract_dense_vectors.py @@ -10,7 +10,7 @@ from app.search.params import timestamp @click.command('') @click.option('-f', '--folder_id', 'opt_folder_id', type=int, help='Folder ID to process') -@click.option('-ls', '--latent_steps', 'opt_latent_steps', default=2000, type=int, +@click.option('-ls', '--latent_steps', 'opt_latent_steps', default=1000, type=int, help='Number of optimization iterations') @click.option('-ds', '--dense_steps', 'opt_dense_steps', default=2000, type=int, help='Number of optimization iterations') diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py index 371316e..3e36a02 100644 --- a/cli/app/search/search_class.py +++ b/cli/app/search/search_class.py @@ -120,8 +120,9 @@ def find_nearest_vector(sess, generator, opt_fp_in, opt_dims, out_images, out_la ## if computing Feature loss, use these encoders if opt_use_feature_detector: print("Initializing feature detector...") - pix_square_diff = tf.square((target - output) / 2.0) - mse_loss = tf.reduce_mean(pix_square_diff) + # pix_square_diff = tf.square((target - output) / 2.0) + # mse_loss = tf.reduce_mean(pix_square_diff) + mse_loss = tf.compat.v1.losses.mean_squared_error(target, output) feature_extractor = hub.Module("https://tfhub.dev/google/imagenet/inception_v3/feature_vector/1") |
