Update models/nextqa_bart.py

This commit is contained in:
Adnen Abdessaied 2024-10-17 14:10:56 +02:00
parent 03ec3544b9
commit 611640acae

View file

@ -635,8 +635,8 @@ class BartEncoder(BartPretrainedModel):
question_X, question_node_idx = track_features_text(question_hidden, question_att, self.config.top_k, device) question_X, question_node_idx = track_features_text(question_hidden, question_att, self.config.top_k, device)
# NOTE: The indices need to be adjusted to match the global input # NOTE: The indices need to be adjusted to match the global input
i3d_rgb_node_idx += 1 i3d_rgb_node_idx = i3d_rgb_node_idx + 1
i3d_flow_node_idx += i3d_flow_interval[0] + 1 i3d_flow_node_idx = i3d_flow_node_idx + i3d_flow_interval[0] + 1
question_node_idx = [x + qi[0] + 1 for x, qi in zip(question_node_idx, question_intervals)] question_node_idx = [x + qi[0] + 1 for x, qi in zip(question_node_idx, question_intervals)]