您好,我在merge.py获取最终模型的时候出现了这样的报错:model.convnext.load_state_dict(torch.load(convnext_path, map_location='cpu')['state_dict'], strict=True) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ KeyError: 'state_dict' 请问应该如何解决
您好,我在merge.py获取最终模型的时候出现了这样的报错:model.convnext.load_state_dict(torch.load(convnext_path, map_location='cpu')['state_dict'], strict=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'state_dict'
请问应该如何解决