polyvore_outfits.py
def load_fitb_questions(fn, im2index, id2im):
    """ Returns the list of fill in the blank questions for the
        split """
    data = json.load(open(fn, 'r'))
    questions = []
    for item in data:
        question = item['question']
        q_index, _, gt = parse_iminfo(question, im2index, id2im)
        answer = item['answers']
        a_index, is_correct, _ = parse_iminfo(answer, im2index, id2im, gt)
        questions.append((q_index, a_index, is_correct))

    return questions
 Returns the list of fill in the blank questions for the
        split 
Returns the list of fill in the blank questions for the
split
Returns the list of fill in the blank questions for the split
def load_fitb_questions(fn, im2index, id2im):
    data = json.load(open(fn, 'r'))
    questions = []
    for item in data:
        question = item['question']
        q_index, _, gt = parse_iminfo(question, im2index, id2im)
        answer = item['answers']
        a_index, is_correct, _ = parse_iminfo(answer, im2index, id2im, gt)
        questions.append((q_index, a_index, is_correct))
    return questions
def load_fitb_questions ( fn , im2index , id2im ) : data = json . load ( open ( fn , 'r' ) ) questions = [ ] for item in data : question = item [ 'question' ] q_index , _ , gt = parse_iminfo ( question , im2index , id2im ) answer = item [ 'answers' ] a_index , is_correct , _ = parse_iminfo ( answer , im2index , id2im , gt ) questions . append ( ( q_index , a_index , is_correct ) ) return questions
Returns the list of fill in the blank questions for the
split
Returns the list of fill in the blank questions for the split
""" Returns the list of fill in the blank questions for the
        split """
fn
im2index
id2im