Pytorch_Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
Pytorch_Realtime_Multi-Person_Pose_Estimation copied to clipboard

what is the use of adding a fc layer when reloading the pretrained model

Open qy-feng opened this issue 6 years ago • 3 comments

With some error with gpu memory, I've got to relance the train part. In the loading part, a new fc layer is added. What does it mean?

# state_dict = torch.load(args.pretrained)['state_dict']
# from collections import OrderedDict
# new_state_dict = OrderedDict()
# for k, v in state_dict.items():
        # name = k[7:]
        # new_state_dict[name] = v
# model.load_state_dict(new_state_dict)
# model.fc = nn.Linear(2048, 80)

qy-feng avatar Dec 21 '17 02:12 qy-feng

Sorry. I forgot to remove it. It's redundant.

last-one avatar Dec 21 '17 06:12 last-one

Thanks for your response. By the way, do you have any script to evaluate the trained model on a test set to get mAP?

qy-feng avatar Dec 21 '17 08:12 qy-feng

yea,I have same question ,as we used the caffe version.

pingjun18-li avatar Dec 21 '17 08:12 pingjun18-li