提交 f605f504 authored 作者: Frederic Bastien's avatar Frederic Bastien

Implement ShapeFeature.on_detach

上级 46903b1e
......@@ -1238,6 +1238,12 @@ class ShapeFeature(object):
for node in fgraph.toposort():
self.on_import(fgraph, node, reason='on_attach')
def on_detach(self, fgraph):
self.shape_of = {}
self.scheduled = {}
self.shape_of_reverse_index = {}
del fgraph.shape_feature
def on_import(self, fgraph, node, reason):
if node.outputs[0] in self.shape_of:
# this is a revert, not really an import
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论