AssertionError: Torch not compiled with CUDA enabled

我遇到的状况不是加个cpu就解决了,那个我会。python

此处是bash

net = torch.nn.DataParallel(net.cuda())
File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 305, in cuda
    return self._apply(lambda t: t.cuda(device))
  File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
    module._apply(fn)
  File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
    module._apply(fn)
  File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 224, in _apply
    param_applied = fn(param)
  File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 305, in <lambda>
    return self._apply(lambda t: t.cuda(device))
  File "D:\python\lib\site-packages\torch\cuda\__init__.py", line 192, in _lazy_init
    _check_driver()
  File "D:\python\lib\site-packages\torch\cuda\__init__.py", line 95, in _check_driver
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

我实在不知道怎么在net.cuda()中填什么,'gpu'或者'gpu:0'都不对,列表也不对,woc微信

仍是没写什么,结果出来个这个,看不懂怎么回事app

/opt/conda/conda-bld/pytorch_1573049304260/work/torch/csrc/autograd/python_function.cpp:622: UserWarning: Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3. Please use new-style autograd function with static forward method

上了个wc,我觉得都运行结束了,谁知道还没开始,woc学习

结果还在运行中,一脸懵逼,为啥看起来将近100%,而实际却不到1/10,1295M和1255Mspa

 

请来看看我吧。Please Do not Keep me Waiting.code

另外有相关问题能够加入QQ群讨论,不设微信群blog

QQ群:868373192 rem

语音图像深度-学习群it

或者发我邮箱:

ucas010@126.com