提交 6eaba038 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Make the copy explicit

上级 df15dc80
......@@ -1328,7 +1328,9 @@ class CAReduce(Op):
output[0] = theano._asarray(variable,
dtype=node.outputs[0].type.dtype)
else:
output[0] = numpy.array(variable, dtype=node.outputs[0].type.dtype)
# Force a copy
output[0] = numpy.array(variable, copy=True,
dtype=node.outputs[0].type.dtype)
def infer_shape(self, node, shapes):
ishape, = shapes
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论