def validate(self, fgraph):
if not hasattr(fgraph, 'destroyers'):
return True
for r in self.protected + list(fgraph.outputs):
if fgraph.destroyers(r):
raise gof.InconsistencyError("Trying to destroy a protected"
"Variable.", r)
评论列表
文章目录