![](/img/trans.png)
[英]Tensorflow - tf.matmul of conv features and a vector as a batch matmul
[英]What is the difference between tf.matmul and tf.batch_matmul in Tensorflow?
例如,如果我有以下数据:
x = tf.placeholder("float", [None, n, n])
y = tf.placeholder("float", [None, n, n])
两种操作之间有什么区别吗?
res = tf.matmul(x,y)
res = tf.batch_matmul(x,y)
不推荐使用tf.batch_matmul
而推荐使用0.12和更高版本中的tf.matmul
,因此在更高版本中没有区别。 较早的版本要求matmul
等级为2的输入,但允许batch_matmul
为更大的等级
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.