繁体   English   中英

Tensorflow中的tf.matmul和tf.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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM