Open ihongxx opened 2 years ago
In the demo code, update the lines to load the model as below:
model = get_model('vgg19') wts_dict = torch.load(args.weight) wts_dict_corrected = {k.replace('module.',''): v for k, v in wts_dict.items()} model.load_state_dict(wts_dict_corrected)
_Originally posted by @SaraSherinThomas in https://github.com/tensorboy/pytorch_Realtime_Multi-Person_Pose_Estimation/issues/145#issuecomment-954444431_
In the demo code, update the lines to load the model as below:
model = get_model('vgg19')
wts_dict = torch.load(args.weight) wts_dict_corrected = {k.replace('module.',''): v for k, v in wts_dict.items()} model.load_state_dict(wts_dict_corrected)
_Originally posted by @SaraSherinThomas in https://github.com/tensorboy/pytorch_Realtime_Multi-Person_Pose_Estimation/issues/145#issuecomment-954444431_