我想乘以张量形式表示的堆叠矩阵。
tensor.shape == [2,5,7,6]
其中 2 和 5 是批量大小,
tensor2.shape == [5,6,8]
其中 5 是批量大小。
在numpy中,tensor2自动广播到[2,5,7,6]张量
所以我可以轻松使用np.matmul(tensor,tensor2)
但在张量流中,会发生错误。
我试过tf.expand_dims(tensor2,0)
了,但这也不起作用
有没有办法在张量流中广播张量?
我想乘以张量形式表示的堆叠矩阵。
tensor.shape == [2,5,7,6]
其中 2 和 5 是批量大小,
tensor2.shape == [5,6,8]
其中 5 是批量大小。
在numpy中,tensor2自动广播到[2,5,7,6]张量
所以我可以轻松使用np.matmul(tensor,tensor2)
但在张量流中,会发生错误。
我试过tf.expand_dims(tensor2,0)
了,但这也不起作用
有没有办法在张量流中广播张量?