[英]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.