From e09e794d8e4354822f9da09ac733bf35aab74a46 Mon Sep 17 00:00:00 2001 From: HBansiwal <44446699+HBansiwal@users.noreply.github.com> Date: Thu, 25 Oct 2018 03:00:23 +0530 Subject: [PATCH] Update losses.py --- losses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/losses.py b/losses.py index 93c56e19..3338f70a 100644 --- a/losses.py +++ b/losses.py @@ -134,7 +134,7 @@ def magnet_loss(features, labels, margin=1.0, unique_labels=None): const = one / (minus_two * (variance + eps)) linear = const * squared_distance - y_mat * margin - maxi = tf.reduce_max(linear, reduction_indices=[1], keepdims=True) + maxi = tf.reduce_max(linear, reduction_indices=[1], keep_dims=True) loss_mat = tf.exp(linear - maxi) a = tf.reduce_sum(y_mat * loss_mat, reduction_indices=[1])