Skip to content

Commit

Permalink
fix gqa post-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 25, 2023
1 parent 794d352 commit b38a7ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lavis/tasks/vqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def _report_metrics(self, result_file, split):
gt_ans = res["gt_ans"]
pred = res["pred_ans"]

if self.inference_method == "generate":
pred = vqa_tool.processPunctuation(pred)
pred = vqa_tool.processDigitArticle(pred)
# if self.inference_method == "generate":
pred = vqa_tool.processPunctuation(pred)
pred = vqa_tool.processDigitArticle(pred)

vqa_acc = 1 if pred == gt_ans else 0

Expand Down

0 comments on commit b38a7ac

Please sign in to comment.