仅作为记录,大佬请跳过。 括号里面要带上torch.load model.load_state_dict(torch.load('/output/model_state_dict.pth')) 即可。 参考