summaryrefslogtreecommitdiff
path: root/cli/app/search/search_class.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/search/search_class.py')
-rw-r--r--cli/app/search/search_class.py5
1 files changed, 3 insertions, 2 deletions
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")