牛骨文教育服务平台(让学习变的简单)
博文笔记

将tf.batch_matmul替换成tf.matmul

创建时间:2017-08-27 投稿人: 浏览次数:1928
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)

声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。