torch、tensorflow-cpu
2019-03-07 本文已影响0人
青草_e75f
import torch
print(torch.__version__)
print(torch)
![](https://img.haomeiwen.com/i16328000/834dd75ea8678fc6.png)
![](https://img.haomeiwen.com/i16328000/4d58e30d101d4cb9.png)
pyana37
import tensorflow as tf
tf.__version__
tf.__path__
![](https://img.haomeiwen.com/i16328000/39ad93afa3ac7838.png)
查看py35下安装的tensorflow版本
import numpy import tensorflow as tf
a = 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))
![](https://img.haomeiwen.com/i16328000/bf5a54c44be71550.png)