From cf566066cbe7788e8cc6fb01d0d7f5df41cdb702 Mon Sep 17 00:00:00 2001 From: jukaizhu <1914702038@qq.com> Date: Thu, 10 Sep 2026 21:13:09 +0800 Subject: [PATCH] fix: bug inner_product --- deepmatch/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmatch/utils.py b/deepmatch/utils.py index c52e6d7..81f7664 100644 --- a/deepmatch/utils.py +++ b/deepmatch/utils.py @@ -51,7 +51,7 @@ def l2_normalize(x, axis=-1): def inner_product(x, y, temperature=1.0): - return Lambda(lambda x: tf.reduce_sum(tf.multiply(x[0], x[1])) / temperature)([x, y]) + return Lambda(lambda x: tf.reduce_sum(tf.multiply(x[0], x[1]), axis=-1, keepdims=True) / temperature)([x, y]) def recall_N(y_true, y_pred, N=50):