将tf.batch_matmul替换成tf.matmul
import tensorflow as 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)
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
- 上一篇: tensorflow编程填坑笔记
- 下一篇: tensorflow学习笔记(二十六):构建TF代码