提交 431e12ac authored 作者: Frederic's avatar Frederic

Fix error on the GPU for ExtractDiag.

When the output was of size 0, we where returning a numpy ndarray instead of a CudaNdarray. No news, as this is a fix to something new since the last release.
上级 bdcef531
......@@ -715,10 +715,9 @@ class ExtractDiag(Op):
implemented our own. """
x, = ins
z, = outs
# zero-dimensional matrices ...
if x.shape[0] == 0 or x.shape[1] == 0:
z[0] = numpy.zeros(0, dtype=x.dtype)
z[0] = node.outputs[0].type.value_zeros((0,))
return
if x.shape[0] < x.shape[1]:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论