huanghoujing / beyond-part-models

PCB of paper: Beyond Part Models: Person Retrieval with Refined Part Pooling, using Pytorch
331 stars 81 forks source link

train combine mode error #10

Closed yja1 closed 6 years ago

yja1 commented 6 years ago

python script/experiment/train_pcb.py \ -d '(0,)' \ --only_test false \ --dataset combined \ --trainset_part trainval \ --exp_dir /data/exp_directory \ --steps_per_log 20 \ --epochs_per_val 2

the error in bpm/dataset/init.py elif name == 'combined': assert part in ['trainval'], "Only trainval part of the combined dataset is available now."

huanghoujing commented 6 years ago

Thank you for your attention!

This is my mistake, more explanation is here.

yja1 commented 6 years ago

I have train a combined model. so if I test the model on 3 datasets respectively should I change something? I run: python script/experiment/train_pcb.py -d '(0,)' --only_test true --dataset duke --exp_dir /data/exp_directory

error: While copying the parameter named fc_list.0.weight, whose dimensions in the model are torch.Size([702, 256]) and whose dimensions in the checkpoint are torch.Size([2220, 256]), ...

huanghoujing commented 6 years ago

Here changing your parameter --dataset duke to --dataset combined should solve the problem. When combined dataset is used, the test sets are three sub test sets, which I hard coded here. The code would test on three sub test sets.