提交 880078dd authored 作者: James Bergstra's avatar James Bergstra

Added copy() of data in tensor.constant. WHY WAS THIS NOT DONE BEFORE?

上级 2c8bb9d9
......@@ -237,7 +237,7 @@ def constant_or_value(x, rtype, name=None, ndim=None, dtype=None):
x_shape = None
return rtype(
TensorType(dtype = x_.dtype, broadcastable = bcastable, shape=x_shape),
x_, name=name)
x_.copy(), name=name)
else:
# leave the shape out of the type
return rtype(TensorType(dtype = x_.dtype, broadcastable = bcastable), x_, name=name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论