今天跑了个BERT,代码出错
AttributeError: module ‘distributed.protocol.torch’ has no attribute ‘cuda’
出错代码是DEVICE = (‘cuda’ if torch.cuda.is_available() else ‘cpu’)
import部分是这样的
我的环境是1.13
解决办法:import torch
今天跑了个BERT,代码出错
AttributeError: module ‘distributed.protocol.torch’ has no attribute ‘cuda’
出错代码是DEVICE = (‘cuda’ if torch.cuda.is_available() else ‘cpu’)
import部分是这样的
我的环境是1.13
解决办法:import torch