PyTorch加载模型model.load_state_dict()问题,Unexpected key(s) in state_dict: "module.features..,Expected .

希望将训练好的模型加载到新的网络上。如上面题目所描述的,PyTorch在加载之前保存的模型参数的时候,遇到了问题。     Unexpected key(s) in state_dict: "module.features. ...".,Expected ".features....". 直接原因是key值名字不对应。     表明了加载过程中,期望获得的key值为feature...,而不是mo
相关文章
相关标签/搜索