I recently dug out an archived densenet121 weight from 2017.
And now I tried to resurrect the weight using PyTorch 1.4.0
It seems the naming convention had been changed due to some reasons.
When I load the same architecture under newer PyTorch version with legacy state_dict, encountered the following error
RuntimeError: Error(s) in loading state_dict for DataParallel:
	Missing key(s) in state_dict: "module.densenet121.features.denseblock1.denselayer1.norm1.weight", "module.densenet121.features.denseblock1.denselayer1.norm1.bias",  ......
	Unexpected key(s) in state_dict: "module.densenet121.features.denseblock1.denselayer1.norm.1.weight", "module.densenet121.features.denseblock1.denselayer1.norm.1.bias", ......

Clearly somehow back in time the keys were in layer.#.param format and probably due to consistency that format was changed to layer#.param
Is there any existing tool to automatically and generally update the old key names to the newer version?