-3
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 would be successfully installed and imported. But according to online articles like this

How to tell if tensorflow is using gpu acceleration from inside python shell?

In the console, it will print

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

I have tested tensorflow gpu with

sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

And it shows me that the device gpu:0 works for the calculation. So tensorflow gpu works.


But the problem is, the console doesn't show the info above (CUDA library successfully opened and so on), when tensorflow GPU is imported.

TrW236
  • 367
  • 1
  • 5
  • 14
  • console doesnt output anything if the import is correct, if the import is not correct then error will pop up, this means tensorflow is installed correctly and you have imported it properly now you can use its classes in the cmd console – Exprator May 20 '17 at 08:47
  • 1
    Please copy/paste outputs rather than use screenshots. – Jérôme May 20 '17 at 08:47
  • I cannot copy it from the Command Prompt – TrW236 May 20 '17 at 08:50
  • How come you can't? I'm pretty sure there are selection / copy options in windows command prompt menu (although I admit it is not trivial). – Jérôme May 20 '17 at 08:52
  • I have changed the screenshot to text – TrW236 May 20 '17 at 09:02
  • Please don't tag spam. This question clearly isn't a CUDA proigramming question and should never have been tagged as one. – talonmies May 20 '17 at 09:20
  • OK sorry, I just thought, maybe Cuda experts can solve this problem – TrW236 May 20 '17 at 09:36

1 Answers1

1

If I recall correctly import statements don't return anything. So nothing happening after import tensorflow is a good thing as there were no errors to be shown. As you said, using sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) gave you the correct output, showing that tensorflow works.

I hope this is what you wanted to know.

mtbrands
  • 142
  • 2
  • 3
  • 12