解决办法: model.load_state_dict(torch.load(".pt",map_location=torch.device('mps'))) model.load_state_dict(torch.load(".pt",map_location=torch.device('mps')))