AttributeError: 'DataParallel' object has no attribute 'copy' 解决方案
当我们用DataParallel训练了一个模型之后,又希望在cpu上run在一下模型,这个时候我们会首先建立模型图model = Mymodel(agrs)之后我们可能会run如下语句:model.load_state_dict(torch.load(model_path),,map_location=lambda storage, loc: storage)这个时候就会报错Attri...
原创
2020-04-16 11:27:06 ·
6998 阅读 ·
0 评论