iti/HandMesh
0
1import torch2from collections import OrderedDict3 4path = 'out/Human36M/cmr_pg_h36m_resumepp_lr5/checkpoints/'5old_name = 'checkpoint_best.pt'6new_name = 'cmr_pg_res18_h36m.pt'7new_weight = OrderedDict()8checkpoint = torch.load(path+old_name, map_location='cpu')['model_state_dict']9 10for k, v in checkpoint.items():11 if 'backbone.' not in k and 'reduce.' not in k:12 new_weight[k] = v13 14torch.save(new_weight, path+new_name)15 