Installing collected packages: wheel, six, appdirs, pyparsing, packaging, setuptools, protobuf, werkzeug, numpy, tensorflow-gpu
Successfully installed appdirs-1.4.3 numpy-1.12.1 packaging-16.8 protobuf-3.3.0 pyparsing-2.2.0 setuptools-35.0.2 six-1.10.0 tensorflow-gpu-1.1.0 werkzeug-0.12.2 wheel-0.29.0
(py35) C:\Users\Tianran>
(py35) C:\Users\Tianran>python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>>
TensorFlow GPU 将成功安装和导入。但是根据网上这样的文章
如何判断 tensorflow 是否从 python shell 内部使用 gpu 加速?
在控制台中,它将打印
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
我已经用 tensorflow gpu 测试过
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
它向我展示了设备 gpu:0 用于计算。所以 tensorflow gpu 可以工作。
但问题是,当导入 tensorflow GPU 时,控制台没有显示上述信息(CUDA 库成功打开等)。