簡體   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