Tensorflow—gpu版,无法使用gpu进行训练,报错:

failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected

原因:只要训练文件、调用文件中有一个文件添加如下语句

os.environ["CUDA_VISIBLE_DEVICES"] = "-1"都会禁用掉gpu
Logo

一站式 AI 云服务平台

更多推荐