提交 de8d6a44 authored 作者: Olivier Breuleux's avatar Olivier Breuleux

forget my last commit, set refcheck=0 in the resize instead

上级 a9a22e80
......@@ -216,12 +216,12 @@ class Broadcast(Op, Destroyer):
output_storage = []
if not self.inplace_pattern:
for output in self.outputs:
# odat = output.data
odat = output.data
shape = [max(values) for values in zip(*[input.data.shape for input in self.inputs])]
# if odat is not None:
# odat.resize(shape)
# else:
odat = numpy.ndarray(shape, dtype = output.dtype)
if odat is not None:
odat.resize(shape, refcheck = 0)
else:
odat = numpy.ndarray(shape, dtype = output.dtype)
output_storage.append(odat)
output.data = odat
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论