KunpengLi1994 / VSRN

PyTorch code for ICCV'19 paper "Visual Semantic Reasoning for Image-Text Matching"
286 stars 47 forks source link

successfully reproduce the result #27

Open ahustr opened 3 months ago

ahustr commented 3 months ago
          Thank you for your reply!

I have find the cause of dropping performance. In data.py line 206 ”with open(loc+'%s_caps.txt' % data_split, 'rb') as f:”, you need to change the open mode from rb to r if you switch the python from 2 to 3, otherwise, the line from the txt file will start with b’,which will confuse the word tokenizer of nltk. Besides, there are still some points need to revise, like the use of “/“ and “iteritem”.


Jiangtong Li

Ph.D Student

Department of Computer Science and Engineering, Shanghai Jiao Tong University, Shanghai, China

Mobile: +8613772437471

E-mail: keep_moving-Lee@sjtu.edu.cn jiangtongli1997@gmail.com

2020年1月15日 22:36,Kunpeng Li notifications@github.com 写道:

Hi,

Our code is built on top of VSE++ https://github.com/fartashf/vsepp with python 2.7. We did not release a version to support Python 3 and latest Pytorch. There should be some difference between different Python or Pytorch versions, which may not lead to errors but can cause different computation results. We did not check the code line by line to find out these difference.

There is a issue https://github.com/fartashf/vsepp/issues/12 in VSE++ talking about the Python 3 version and also a brunch https://github.com/fartashf/vsepp/tree/python3 related. I did not check whether it can really work well but hope this can help.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KunpengLi1994/VSRN/issues/15?email_source=notifications&email_token=ANGJKU4MDT2EYXYDABFOIFDQ54NQLA5CNFSM4KG5HHEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJAQQZQ#issuecomment-574687334, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGJKU2373VMA43ITZH4CDDQ54NQLANCNFSM4KG5HHEA.

Originally posted by @Jiangtong-Li in https://github.com/KunpengLi1994/VSRN/issues/15#issuecomment-574765837

ahustr commented 3 months ago

just change the open mode from rb to r