提交 715b5f82 authored 作者: Frederic's avatar Frederic

Pass the memod dict in deepcopy as it should be.

上级 d7e5ac2e
...@@ -681,6 +681,8 @@ class TensorConstant(_tensor_py_operators, Constant): ...@@ -681,6 +681,8 @@ 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.deepcopy(self.type), copy.deepcopy(self.data), copy.deepcopy(self.name)) return type(self)(copy.deepcopy(self.type, memo),
copy.deepcopy(self.data, memo),
copy.deepcopy(self.name, memo))
TensorType.Constant = TensorConstant TensorType.Constant = TensorConstant
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论