daodaofr / hypergraph_reid

Code for CVPR 2020 paper Learning Multi-Granular Hypergraphs for Video-Based Person Re-Identification
72 stars 23 forks source link

ValueError: not enough values to uppack (expected 6, got 5) #3

Closed Seven-gcc closed 3 years ago

Seven-gcc commented 3 years ago

Excuse me. When I tested the computer memory was not enough, I changed the loader mode of the test data set to the random mode, and the computer reported an error: ValueError: not enough values to unpack (expected 6, got 5).Looking foward for your answer.Thank you very much!

daodaofr commented 3 years ago

hi, the test batch size is 1 as default value (for the query loader and gallery loader), if you can train normally, the testing would not have a memory issue.

could you please share more information ?

Seven-gcc commented 3 years ago

It's really my honor to receive your reply!The current issue is that when 100 epochs were trained and the net turned to test with cuda9.0 or cuda10.1 and pytorch1.6, the model training would be interrupted and the terminal showed as follows: _==> Test Traceback (most recent call last): File "main_video_person_reid_hypergraphsagepart.py", line 358, in _ main() File "main_video_person_reid_hypergraphsage_part.py", line 228, in main rank1 = test(model, queryloader, galleryloader, args.pool, use_gpu) File "main_video_person_reid_hypergraphsagepart.py", line 292, in test b, n, s, c, h, w = imgs.size() ValueError: not enough values to unpack (expected 6, got 5)

And when I run the file with cuda9.0 or cuda10.1 and pytorch 0.4,the terminal showed as follows: _==> Epoch 1/800 lr:2.9999999999999997e-06 THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch1535493744281/work/aten/src/THC/THCGeneral.cpp line=663 error=11 : invalid argument Traceback (most recent call last):

I'm sorry to disturb you so late, thank you very much!

daodaofr commented 3 years ago

hi, I think it is an environment issue, I used pytorch 1.1.0 and cuda9.2. You can just use the argument --evaluate, and see if it runs good.

Seven-gcc commented 3 years ago

Ok! Thank you again! I will try it again !

Seven-gcc commented 3 years ago

Hi !Now my model training is over!But there is another question: how to load the trained model for testing?

daodaofr commented 3 years ago

you can use the argument --pretrained-model "your model" --evaluate to load the trained model for testing

Seven-gcc commented 3 years ago

Thank you for your reply! It's OK! I wrongly tried the argument--pretrained-model "PATH" --evaluate!