为什么代码里设置gpu运行,可是还是cpu运行的?
python吧
全部回复
仅看楼主
level 1
david19960516 楼主
我昨晚跑的cnn代码速度飞快,而且也显示了gpu,今天早上跑的数据十秒多才一个数据,显示的是cpu跑的,我有什么办法启动gpu么
2019年05月08日 02点05分 1
level 1
david19960516 楼主
config = tf.ConfigProto(allow_soft_placement=False)
config.gpu_options.allow_growth = True
from tensorflow.python.client import device_lib
import os
#import pydicom as dicom
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
我已经是这么设置了,昨天跑的gpu,今天就只能用cpu的
2019年05月08日 02点05分 2
level 10
可以试图使用opencl版本[滑稽]
2019年05月08日 02点05分 3
1