Find out if tensorflow using gpu acceleration in python

How to be sure your pc uses gpu acceleration or not in python script (for some checking purposes)?

tensorflowgpu
2 votesLP190.00
1 Answers
JW234.00
2

Just put this code in your script and take a look at your logs when you run the script.

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

Or just call the nested function of tensorflow

import tensorflow as tf
tf.test.gpu_device_name()
Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?