已成功配置GPU 的MAC-成功解决torch.load with map_location=torch.device(“cpu”) to map your storages to the CPU

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

model.load_state_dict(torch.load(".pt",map_location=torch.device('mps')))

猜你喜欢

转载自blog.csdn.net/haimengjie/article/details/127150700
今日推荐