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