yxgeee / FD-GAN

[NeurIPS-2018] FD-GAN: Pose-guided Feature Distilling GAN for Robust Person Re-identification.
https://yxgeee.github.io/projects/fdgan.html
281 stars 80 forks source link

FD-GAN cannot be pretrained in stage two #2

Closed QingzeYin closed 6 years ago

QingzeYin commented 6 years ago

After testing stage one, when I was doing FD-GAN pretraining in stage two, the error was occurred as shown below: screenshot from 2018-10-24 11-26-27 screenshot from 2018-10-24 11-21-44 Do you know which part need to be fixed?

yxgeee commented 6 years ago

Since you save your baseline model weights in a key named 'state_dict' (https://github.com/yxgeee/FD-GAN/blob/master/baseline.py#L150).

you can just modify no.54 line in your screenshot state_dict = remove_module_key(torch.load(self.opt.netE_pretrain)['state_dict'])

QingzeYin commented 6 years ago

Since you save your baseline model weights in a key named 'state_dict' (https://github.com/yxgeee/FD-GAN/blob/master/baseline.py#L150).

you can just modify no.54 line in your screenshot state_dict = remove_module_key(torch.load(self.opt.netE_pretrain)['state_dict'])

Thanks for your quickly replying :+1: . I fixed that with this explicit explanation