- # Python
- import tensorflow as tf
- hello = tf.constant('Hello, TensorFlow!')
- sess = tf.Session()
- print(sess.run(hello))
- import tensorflow as tf
- sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
- >>>
- Device mapping:
- /job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: GeForce GTX 960M, pci bus id: 0000:02:00.0, compute capability: 5.0