在 Tensorflow 中,我看到了以下示例:
import tensorflow as tf
import numpy as np
mat_a = tf.constant(np.arange(1,13, dtype=np.int32), shape=[2,2,3])
mat_b = tf.constant(np.arange(12,24, dtype=np.int32), shape=[2,3,2])
mul_c = tf.matmul(mat_a, mat_b)
with tf.Session() as sess:
runop = sess.run(mul_c)
print(runop)
[[[ 88 94]
[214 229]]
[[484 508]
[642 674]]]
张量乘法是如何工作的?