【发布时间】:2019-08-17 12:45:05
【问题描述】:
报错信息如下:
RuntimeError Traceback (most recent call last)
<ipython-input-24-06e96beb03a5> in <module>()
11
12 x_test = np.array(test_features)
---> 13 x_test_cuda = torch.tensor(x_test, dtype=torch.float).cuda()
14 test = torch.utils.data.TensorDataset(x_test_cuda)
15 test_loader = torch.utils.data.DataLoader(test, batch_size=batch_size, shuffle=False)
/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py in _lazy_init()
160 class CudaError(RuntimeError):
161 def __init__(self, code):
--> 162 msg = cudart().cudaGetErrorString(code).decode('utf-8')
163 super(CudaError, self).__init__('{0} ({1})'.format(msg, code))
164
RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:51
【问题讨论】:
-
你能澄清一下你到目前为止所做的尝试吗?确切的设置是什么,您的相关代码是什么?
-
您是否检查过您是否启用了 GPU 加速?
-
是的,我不打开这个 GPU!谢谢!
-
“火炬”,你的意思是PyTorch吗? “Torch”的标签 wiki 说 “Torch 是 LuaJIT 的科学计算框架。它被世界各地的机器学习研究人员广泛使用。”.
标签: pytorch google-colaboratory torch