Cysu / open-reid

Open source person re-identification library in python
https://cysu.github.io/open-reid/
MIT License
1.34k stars 349 forks source link

small typo error #8

Closed miraclebiu closed 7 years ago

miraclebiu commented 7 years ago

Line 99 in example/tripletloss.py num_classes should be the value above rather than args.num_features

miraclebiu commented 7 years ago

and small difference in load model in example/tripletloss.py in args.resume use model.load_state_dict() while in the end of the train use model.module.load_state_dict()

Cysu commented 7 years ago

@miraclebiu Thank you very much for the suggestions!

  1. Line 99 is indeed a hacking that generates the net structure avgpool -> FC(1024) -> FC(args.features), which follows the setting in this paper.

  2. Using model.load_state_dict() here in args.resume is because the model is not yet wrapped by nn.DataParallel. While in the end the model is wrapped by it, so we need to call model.module.load_state_dict().