提交 67a685e0 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix type problem when in dimension 0.

上级 dce8a601
...@@ -1041,7 +1041,7 @@ class Dot(Op): ...@@ -1041,7 +1041,7 @@ class Dot(Op):
return Apply(self, inputs, outputs) return Apply(self, inputs, outputs)
def perform(self, node, (x, y), (z, )): def perform(self, node, (x, y), (z, )):
z[0] = numpy.dot(x, y) z[0] = numpy.asarray(numpy.dot(x, y))
def grad(self, (x, y), (gz,)): def grad(self, (x, y), (gz,)):
if gz.type.ndim == 0: if gz.type.ndim == 0:
return gz * y, gz * x return gz * y, gz * x
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论