def make_node(self, A, B):
A = T.as_tensor_variable(A)
B = T.as_tensor_variable(B)
assert A.ndim in [2, 3]
assert B.ndim in [2, 3]
assert A.ndim == B.ndim
otype = T.tensor(
broadcastable=B.broadcastable,
dtype=(A * B).dtype)
return theano.gof.Apply(self, [A, B], [otype])
评论列表
文章目录