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

出错位置: python train_label_batch = torch.from_numpy(train_label_batch) 解决办法:将数据类型转换成FloatTensor便可,以下,加一行代码Tensor.type(torch.FloatTensor)code train_label_batch = torch.from_numpy(train_label_batch) train
相关文章
相关标签/搜索