diff options
Diffstat (limited to 'tensorflow/docs_src/tutorials/using_gpu.md')
-rw-r--r-- | tensorflow/docs_src/tutorials/using_gpu.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/docs_src/tutorials/using_gpu.md b/tensorflow/docs_src/tutorials/using_gpu.md index e4e342adfe..d64cdafdef 100644 --- a/tensorflow/docs_src/tutorials/using_gpu.md +++ b/tensorflow/docs_src/tutorials/using_gpu.md @@ -28,7 +28,7 @@ c = tf.matmul(a, b) # Creates a session with log_device_placement set to True. sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) # Runs the op. -print sess.run(c) +print(sess.run(c)) ``` You should see the following output: @@ -61,7 +61,7 @@ with tf.device('/cpu:0'): # Creates a session with log_device_placement set to True. sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) # Runs the op. -print sess.run(c) +print(sess.run(c)) ``` You will see that now `a` and `b` are assigned to `cpu:0`. @@ -131,7 +131,7 @@ with tf.device('/gpu:2'): # Creates a session with log_device_placement set to True. sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) # Runs the op. -print sess.run(c) +print(sess.run(c)) ``` If the device you have specified does not exist, you will get @@ -160,7 +160,7 @@ with tf.device('/gpu:2'): sess = tf.Session(config=tf.ConfigProto( allow_soft_placement=True, log_device_placement=True)) # Runs the op. -print sess.run(c) +print(sess.run(c)) ``` ## Using multiple GPUs @@ -182,7 +182,7 @@ with tf.device('/cpu:0'): # Creates a session with log_device_placement set to True. sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) # Runs the op. -print sess.run(sum) +print(sess.run(sum)) ``` You will see the following output. |