import tensorflow as tf
matrix1 = tf.constant([[3,3]])#矩阵
matrix2 = tf.constant([[2],[2]])
product = tf.matmul(matrix1,matrix2)#矩阵相乘
#
# #methid 1
# see = tf.Session()
# result = see.run(product)
# print(result)
# see.close()
#method2
with tf.Session() as sess:
result2 = sess.run(product)
print(result2)
Tensorflow学习二 Session
猜你喜欢
转载自blog.csdn.net/weixin_43408956/article/details/93380279
今日推荐
周排行