I've successfully installed tensorflow with pip install tensorflow
and that all works as expected.
I can also successfully install tensorflow-gpu with pip install tensorflow-gpu
but I can't import it in my python script:
import tensorflow-gpu
File "<stdin>", line 1
import tensorflow-gpu
^
SyntaxError: invalid syntax
i've installed CUDA v9.0 and run windows 10
To ensure that the tensorflow package is using your GPU, do this:
import tensorflow as tf
sess = tf.Session()
See the output on the console, if it shows your GPU information on creation of the session as shown below.
Notice "GeForce 940MX" in the information. Also note that Tensorflow will use a Nvidia GPU only if the compute capability score is above 3.5 . More about that here.
If it's not using the GPU, then it won't output GPU information, it'll just show something similar to this:
The package on pypi is called tensorflow-gpu but you just import it with "tensorflow"
import tensorflow as tf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With