tensorflow—— 基础中的基础
import tensorflow as tf
会话打开
m_1 = tf.constant([[3,2]])
m_2 = tf.constant([[3],
[2]])
pr = tf.matmul(m_1,m_2)
with tf.Session() as s_1:
result = s_1.run(pr)
print(result)
[[13]]
第二种打开方式
s_2 = tf.Session()
result_2 = s_2.run(pr
原创
2020-08-19 09:14:58 ·
85 阅读 ·
0 评论