tf.matmul(a,b) #矩阵ab相乘
实例1
import tensorflow as tf
a = tf.constant([1, 2, 3, 4, 5, 6], shape=[2, 3])
b = tf.constant([7, 8, 9, 10, 11, 12], shape=[3, 2])
c = tf.matmul(a, b)
with tf.Session() as sess:
print(sess.run([a,b,c]))
#OUt:array([[ 58 64]
[139 154]])