def output_func(self, input):
# P(Y|X) = softmax(W.X + b)
q, a, feats = input[0], input[1], input[2]
# dot = T.batched_dot(q, T.batched_dot(a, self.W))
dot = T.batched_dot(q, T.dot(a, self.W.T))
out = T.concatenate([dot.dimshuffle(0, 'x'), feats], axis=1)
# out = feats
return out
评论列表
文章目录