tf显示设备使用 发表于 2018-06-Fri | 阅读次数: 1234567import tensorflow as tfa = 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)sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))print sess.run(c)请作者喝一杯咖啡☕️打赏微信支付