Paranioar / SGRAF

[AAAI2021] The code of “Similarity Reasoning and Filtration for Image-Text Matching”
214 stars 36 forks source link

run #5

Closed rabrabrab closed 3 years ago

rabrabrab commented 3 years ago

i have set the virtual environment of my pycharm as same as torch1.2.0 and python2.7. But i can't run through after my train when i want to evaluate the model. it shows indexerror with indices for array. Is something wrong with my environment or my data or some other probability? I tried to solve it with my friends but we found that the code is totally correct. But it still can't successfully eval on my computer. This problem had been haunted me for few days. Thank u.

Paranioar commented 3 years ago

i have set the virtual environment of my pycharm as same as torch1.2.0 and python2.7. But i can't run through after my train when i want to evaluate the model. it shows indexerror with indices for array. Is something wrong with my environment or my data or some other probability? I tried to solve it with my friends but we found that the code is totally correct. But it still can't successfully eval on my computer. This problem had been haunted me for few days. Thank u.

Please show more details. What and where was the error reported?And what is the size of related features? Our recommended environment is Python 2.7, Pytorch0.4 which may be not the cause of this problem.

rabrabrab commented 3 years ago

0331_2 0331_1 0331_1 is the old pronblem, 0331_2 is the new one.Sorry

Paranioar commented 3 years ago

Firstly, if you use pytorch0.4, you should train from scratch because of the different variable definitions. Secondly, when using pytorch1.2, please provide the shape of img_emb, img_embs, ids and the max value of ids during the whole process.

rabrabrab commented 3 years ago

ok, actually i prefer torch1.2, because i have seen some other people had run successfully by this environment. Here the debug pictures are. The torch version is 1.2. Thanks for your reply~ ids img_emb_shape img_embs_shape

Paranioar commented 3 years ago

Change this code to 【img_embs[ids, :, :] = img...】