device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")model.to(device)这两行代码放在读取数据之前。mytensor ...
確定! 回上一頁