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
相關文章
相關標籤/搜索