提交 6fd91c68 authored 作者: Frederic's avatar Frederic

client of variable can be the string 'output'

上级 dce1d289
...@@ -2992,10 +2992,11 @@ class Canonizer(gof.LocalOptimizer): ...@@ -2992,10 +2992,11 @@ class Canonizer(gof.LocalOptimizer):
for c, c_idx in out.clients: for c, c_idx in out.clients:
if c == 'output': if c == 'output':
continue continue
while (isinstance(c.op, DimShuffle) and while (isinstance(getattr(c, 'op', None), DimShuffle) and
len(c.outputs[0].clients) <= 1): len(c.outputs[0].clients) <= 1):
c = c.outputs[0].clients[0][0] c = c.outputs[0].clients[0][0]
if c.op in [self.main, self.inverse, self.reciprocal]: if getattr(c, 'op', '') in [self.main, self.inverse,
self.reciprocal]:
return False return False
# Here we make the canonical version of the graph around this node # Here we make the canonical version of the graph around this node
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论