tensorflow1.0 矩阵相乘
import tensorflow as tf
matrix1 = tf.constant([[3,3]])
matrix2 = tf.constant([[2],[2]])
product = tf.matmul(matrix1,matrix2) #矩阵相乘
# sess = tf.Session()
# result = sess.run(product)
# print(result)
# sess.close()
with tf.Session() as sess:
result2 = sess.run(product)
print(result2)
[[12]]
多思考也是一种努力,做出正确的分析和选择,因为我们的时间和精力都有限,所以把时间花在更有价值的地方。

浙公网安备 33010602011771号