【发布时间】:2020-07-27 07:44:52
【问题描述】:
我是torch和python的大佬,
我正在尝试使用 Google COlab 在网上找到的一些机器学习代码,但出现以下错误:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-4-d4b0db6cedae> in <module>()
295 input_dropout=input_dropout, hidden_dropout1=hidden_dropout1,
296 hidden_dropout2= hidden_dropout2, label_smoothing= label_smoothing)
--> 297 experiment.train_and_eval()
298
299
2 frames
/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py in _lazy_init()
195 "Cannot re-initialize CUDA in forked subprocess. " + msg)
196 _check_driver()
--> 197 torch._C._cuda_init()
198 _cudart = _load_cudart()
199 _cudart.cudaGetErrorName.restype = ctypes.c_char_p
RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:50
我知道 cude 是用于 GPU 处理的?那么我该如何解决这个问题呢? 我在这个link中试验代码:
【问题讨论】:
-
这能回答你的问题吗? How to install CUDA in Google Colab GPU's