RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
一般是输入并未添加到cuda中, x.to('cuda'), 或者将模型放到cpu中去运行。
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
一般是输入并未添加到cuda中, x.to('cuda'), 或者将模型放到cpu中去运行。