提交 6af98f5c authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix reload of old composite

上级 ed494e9b
......@@ -3996,6 +3996,7 @@ class Composite(ScalarOp):
def __getstate__(self):
rval = dict(self.__dict__)
rval.pop('_impls', None)
rval.pop('prepare_node_called', None)
del rval['fgraph']
return rval
......@@ -4003,6 +4004,8 @@ class Composite(ScalarOp):
self.__dict__.update(d)
# We must call init to set fgraph and _impls again, as otherwise
# self.perform will not work.
if not hasattr(self, "prepare_node_called"):
self.prepare_node_called = set()
self.init_fgraph()
self.init_py_impls()
assert self._c_code
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论