RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should b

链接: http://t.csdn.cn/z3gkm

torch.tensor对应的是torch.DoubleTensor
torch.Tensor对应的是torch.FloatTensor

观察下 t的大小写
input = torch.Tensor(np.random.randn(4,3,256,256)).to(device)