提交 9dd0401f authored 作者: Frederic's avatar Frederic

Do deep copy when asked!

上级 053b08bd
...@@ -681,6 +681,6 @@ class TensorConstant(_tensor_py_operators, Constant): ...@@ -681,6 +681,6 @@ class TensorConstant(_tensor_py_operators, Constant):
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
# We need to do this to remove the cached attribute # We need to do this to remove the cached attribute
return type(self)(copy.copy(self.type), copy.copy(self.data), copy.copy(self.name)) return type(self)(copy.deepcopy(self.type), copy.deepcopy(self.data), copy.deepcopy(self.name))
TensorType.Constant = TensorConstant TensorType.Constant = TensorConstant
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论