From 63ad5cd1b5d894212e9ecd0c4bc29d47c59ae44b Mon Sep 17 00:00:00 2001 From: Peng Jin <53246557+jpthu17@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:21:04 +0800 Subject: [PATCH] fix a bug --- HBI/models/banzhaf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HBI/models/banzhaf.py b/HBI/models/banzhaf.py index 7b9aa24..4ea1a3d 100644 --- a/HBI/models/banzhaf.py +++ b/HBI/models/banzhaf.py @@ -126,6 +126,7 @@ def banzhaf_interaction(self, retrieve_logits, text_mask, video_mask, text_weigh ######################### _text_mask[:, i] = 1 + _video_mask[:, j] = 0 _text_weight0, _video_weight0 = text_weight.clone(), video_weight.clone() _retrieve_logits0 = retrieve_logits.clone() @@ -146,6 +147,7 @@ def banzhaf_interaction(self, retrieve_logits, text_mask, video_mask, text_weigh banzhaf_value2 = (t2v_logits + v2t_logits) / 2.0 ######################### + _text_mask[:, i] = 0 _video_mask[:, j] = 1 _text_weight0, _video_weight0 = text_weight.clone(), video_weight.clone()