提交 15249c25 authored 作者: Melanie Ducoffe's avatar Melanie Ducoffe

en cours

上级 2fd2c968
......@@ -5493,7 +5493,7 @@ class AllocEmpty(gof.Op):
except tensor.NotScalarConstantError:
const_shp = None
bcast.append(numpy.all(1 == const_shp))
otype = tensor.TensorType(dtype='float32', broadcastable=bcast)
otype = tensor.TensorType(dtype=self.dtype, broadcastable=bcast)
output = otype()
return sh, output
......@@ -5507,7 +5507,7 @@ class AllocEmpty(gof.Op):
sh = tuple([int(i) for i in inputs])
if out[0] is None or out[0].shape != sh:
# XXX: We could implement and call CudaNdarray.empty(sh) instead.
out[0] = numpy.zeros(sh)
out[0] = numpy.empty(sh)
def do_merge(self, node):
return False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论