import tensorflow as tf
import numpy as np
matrix1 = tf.constant([[3,3]])
matrix2 = tf.constant([[2],
[2]])
product = tf.matmul(matrix1, matrix2)
# method1
sess = tf.Session()
print(sess.run(product))
sess.close()
#method2
with tf.Session() as sess:
print(sess.run(product))
tf.Session
猜你喜欢
转载自blog.csdn.net/qq_25974431/article/details/79888735
今日推荐
周排行