二维稠密张量与三维稠密张量的张量积可以按如下方式进行:
shape=[2,4,3]
dense2d = tf.constant([[0,1.0,2.0],[0,0,0],[0,0,0]])
dense3d = tf.placeholder("float", shape=shape)
res = tf.tensordot(dense3d,dense2d,axes=1)
res.set_shape(shape)
我们可以用二维稀疏张量代替它来得到同样的结果吗?如果我们有密码呢
^{pr2}$而不是dense2d
?在
仅供参考,这篇文章与这个github issue有关。我知道tf.sparse_tensor_dense_matmul
不支持rank>;2。有解决办法吗?在
目前没有回答
相关问题 更多 >
编程相关推荐