将tf.batch_matmul替换成tf.matmul

2022-09-25 11:28:28
import tensorflowas tf
h_doc=tf.placeholder(tf.int32,[None,30,512])
h_query=tf.placeholder(tf.int32,[None,10,512])
temp = tf.matmul(h_doc, h_query, adjoint_b =True)# tf.batch_matmul(h_doc, h_query, adj_y=True)
print(temp.get_shape())

(?, 30, 10)

  • 作者:theDunker
  • 原文链接:https://guotong1988.blog.csdn.net/article/details/77622078
    更新时间:2022-09-25 11:28:28