You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the function tifa_score_single, there are these lines:
if question_answer_pair['question'] not in question_logs:
question_logs[question_answer_pair['question']] = question_answer_pair
choices=question_answer_pair['choices']
Consider changing this to:
if question_answer_pair['question'] not in question_logs:
question_logs[question_answer_pair['question']] = copy.deepcopy(question_answer_pair)
choices=question_answer_pair['choices']
Otherwise, whenever you run result = tifa_score_single(vqa_model, filtered_questions, img_path)
you are changing the original filtered_questions, and result contain a reference to filtered_questions. Wierd things would happen. For example, if you make a new call with the same filtered_questions, the result from the previous call would be changed.
The text was updated successfully, but these errors were encountered:
In the function
tifa_score_single
, there are these lines:Consider changing this to:
Otherwise, whenever you run
result = tifa_score_single(vqa_model, filtered_questions, img_path)
you are changing the original
filtered_questions
, and result contain a reference tofiltered_questions
. Wierd things would happen. For example, if you make a new call with the samefiltered_questions
, the result from the previous call would be changed.The text was updated successfully, but these errors were encountered: