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
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.
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
Originally posted by @Jiangtong-Li in https://github.com/KunpengLi1994/VSRN/issues/15#issuecomment-574765837