AssertionError: Torch not compiled with CUDA enabled

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

此处是

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

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

/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和1255M

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

另外有相关问题可以加入QQ群讨论,不设微信群

QQ群:868373192 

语音图像深度-学习群

或者发我邮箱:

[email protected]

发布了189 篇原创文章 · 获赞 170 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/SPESEG/article/details/103717591
今日推荐