jialinwu17 / self_critical_vqa

Code for NeurIPS 2019 paper ``Self-Critical Reasoning for Robust Visual Question Answering''
40 stars 10 forks source link

Is there a bug in create_vqx_hint.py? #5

Open BierOne opened 4 years ago

BierOne commented 4 years ago

Hi, jialing! Recently, I am trying to introduce 'the most influential objects' into my model. However, when I check 'create_vqx_hint.py', I don't understand the code at lines 187-189.

if cosine_similarity(exp_emb[attr_token:attr_token+1], atts[j:j+1]) > 0.3 :
        if hint_score_attr[j] <= cosine_similarity(exp_emb[attr_token:attr_token+1], atts[j:j+1]):
                hint_score[j] = cosine_similarity(exp_emb[attr_token:attr_token+1], atts[j:j+1])

I also found that you don't use 'hint_score_attr' anymore, but this code would change 'hint_score[j]' that has been assigned at line 179. Thus, is it should be more reasonable that using 'hint_score_attr[j]' to replace 'hint_score[j]' at line 189. like this:

if cosine_similarity(exp_emb[attr_token:attr_token+1], atts[j:j+1]) > 0.3 :
        if hint_score_attr[j] <= cosine_similarity(exp_emb[attr_token:attr_token+1], atts[j:j+1]):
                hint_score_attr[j] = cosine_similarity(exp_emb[attr_token:attr_token+1], atts[j:j+1])
alice-cool commented 2 years ago

学者您有train36百度云盘的下载链接吗?国内google drive 显示下载配额不够,不知道怎么能下载文件,