That is a very useful way to manipulate names in the state_dict. However, im not sure how to do it…
can you please explained a little bit more or provide an example on how to do that?
i also have another question.
when i do the following code i will have:
load_name = os.path.join(input_dir, 'trfcn_1_1_52.pth')
checkpoint = torch.load(load_name)
checkpoint['model'].keys()

the output is:

odict_keys([‘RCNN_rpn.RPN_Conv.weight’, ‘RCNN_rpn.RPN_Conv.bias’, ‘RCNN_rpn.RPN_cls_score.weight’, ‘RCNN_rpn.RPN_cls_score.bias’, ‘RCNN_rpn.RPN_bbox_pred.weight’, ‘RCNN_rpn.RPN_bbox_pred.bias’, ‘InsideNet.Conv1.weight’, ‘InsideNet.Conv3.weight’, ‘InsideNet.Conv4.weight’, ‘RCNN_bbox_base.weight’, ‘RCNN_cls_base.weight’])

is there a way that i just keep the

‘InsideNet.Conv1.weight’, ‘InsideNet.Conv3.weight’, ‘InsideNet.Conv4.weight’

and delete the rest???
Thanks a lot