title: Tensorflow not using GPU with jupyter (Windows)
body: <p>I have tensorflow GPU working with CUDA.</p>
  
  <p><a href="https://i.stack.imgur.com/prWhy.png" rel="nofollow noreferrer">Tensorflow GPU</a>  </p>
  
  <p>But when I am running the following code in jupyter notebook: </p>
  
  <pre><code>import sys
  import numpy as np
  import tensorflow as tf
  from datetime import datetime
  
  with tf.device('/gpu:0'):
    a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
    b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
    c = tf.matmul(a, b)
  # Creates a session with allow_soft_placement and log_device_placement set
  # to True.
  sess = tf.Session(config=tf.ConfigProto(
        allow_soft_placement=True, log_device_placement=True))
  # Runs the op.
  print (sess.run(c))
  </code></pre>
  
  <p>The command prompt shows that CPU was used and not the GPU. </p>
  
  <p><a href="https://i.stack.imgur.com/VGotN.png" rel="nofollow noreferrer">Command Prompt Screen</a></p>