<h1 id="测试程序"><a name="t0"></a>测试程序</h1>
# Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
- 1
- 2
- 3
- 4
- 5
- 6
是否支持GPU
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
- 1
- 2
- 3
- 4
- 5
- 6
转载自:https://blog.csdn.net/renhaofan/article/details/81987728?utm_source=blogxgwz9