From f016ec486844c38e84a6d6fc9607c3080ce878a8 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 21 Jan 2020 14:52:01 +0100 Subject: tf math minimum --- cli/app/search/search_class.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/app/search/search_class.py') diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py index 970d25f..e05f58b 100644 --- a/cli/app/search/search_class.py +++ b/cli/app/search/search_class.py @@ -113,7 +113,7 @@ def find_nearest_vector(sess, generator, opt_fp_in, opt_dims, out_images, out_la ## normalize the Y encoding # normalized_labels = tf.nn.l2_normalize(input_y) # tf.reduce_mean(tf.abs(encoding - gen_encoding)) - normalized_labels = input_y / tf.min(1.0, tf.reduce_max(input_y)) + normalized_labels = input_y / tf.math.minimum(1.0, tf.reduce_max(input_y)) normalized_alpha = tf.compat.v1.placeholder(dtype=np.float32, shape=()) clip_labels = tf.assign(input_y, normalized_labels * (1 - normalized_alpha) + input_y * normalized_alpha) -- cgit v1.2.3-70-g09d2