Skip to content

Commit 153434c

Browse files
author
Ye Shaokai
committed
fixed a bug about masking
1 parent c5ee60b commit 153434c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llava/model/language_model/llava_qwen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def forward(
249249

250250
if world_has_valid: # If any process has valid examples
251251
for other_verb_logits, other_noun_logits, other_action_logits in triples:
252-
valid_mask = actions[:, 0] > 0
252+
valid_mask = actions[:, 0] >= 0
253253

254254
if valid_mask.any(): # This process has valid examples
255255
valid_verb_logits = other_verb_logits[valid_mask]

llava/train/llava_trainer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ def __init__(self,
495495
self.eval_args = eval_args
496496
self.model_max_length = model_max_length
497497

498+
498499
def evaluate(self, eval_dataset=None, ignore_keys=None, metric_key_prefix="eval", eval_result_folder = None):
499500

500501
accuracy = evaluate_on_EK100(self.eval_args, self.model, self.tokenizer, eval_result_folder = eval_result_folder)

0 commit comments

Comments
 (0)