Closed rabrabrab closed 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.
0331_1 is the old pronblem, 0331_2 is the new one.Sorry
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.
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~
Change this code to 【img_embs[ids, :, :] = img...】
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.