RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at ..\aten\src\THC\THCGen

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at ..\aten\src\THC\THCGeneral.cpp:50

解决办法:

import torch
torch.cuda.current_device()
torch.cuda._initialized = True

 

你可能感兴趣的:(运行环境解决办法)