莫烦tensorflow(2)-Session

import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

import tensorflow as tf
matrix1 = tf.constant([[3,3]])
matrix2 = tf.constant([[2],[2]])
protuct = tf.matmul(matrix1,matrix2)

# sess = tf.Session()
# result = sess.run(protuct)

# print(result)
# sess.close()

with tf.Session() as sess:
result = sess.run(protuct)
print(result)

上一篇:Linux操作系统入门学习总结(2015.10)


下一篇:PowerDesigner设计时表显示注释选项