原因: 数据没有给cuda 解决办法
img_patch = torch.tensor(np.expand_dims(img_arr, axis=[0,1])).to(device)
这样就可以啦
京公网安备 11010502049817号