AssertionError: Torch not compiled with CUDA enabled
AssertionError: Torch not compiled with CUDA enabled原来代码中device = torch.device('cuda')此错误是由于下载的torch没有cuda,在运行时就会出错,经过查阅,应该改为device = torch.device("cuda" if torch.cuda.is_available() else "cpu")...