Person_reID_baseline_pytorch
Person_reID_baseline_pytorch copied to clipboard
RuntimeError: Error(s) in loading state_dict for ft_net #25
Desktop (please complete the following information):
- OS: ubuntu 20.04
- Browser firefox
- Version [e.g. 22]
Hi, I'm new in the person-Reid and thank you for making a good code sample
I got this error when I test the Resnet50 with triplet-loss on Market-1501
And I find that when I trained and tested normal person re-id task (not using triplet loss) with nn.DataParallel for using multi GPU at training time, the error has occurred.
The model was trained well during 180m but when I implement the code 'python test.py --gpu_ids 0 --name ft_ResNet50 --test_dir MY_DATA_PATH --which_epoch 59' for testing the model, I got a problem
How can I solve this problem?
Hi @jhq1234
If you use multiple gpus, you need to make the model as DataParallel in the test.py
as well before loading it.