提交 097da8e2 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

fixed feature class versus instance issue

上级 487d25ed
......@@ -686,7 +686,7 @@ def _optcheck_fgraph(input_specs, output_specs, accept_inplace=False):
and fgraph.destroyers(input)))))
for feature in std_fgraph.features:
fgraph.extend(feature)
fgraph.extend(feature())
return fgraph, map(SymbolicOutput, updates), equivalence_tracker
......
......@@ -148,7 +148,7 @@ def std_fgraph(input_specs, output_specs, accept_inplace = False):
return fgraph, map(SymbolicOutput, updates)
std_fgraph.features = [gof.toolbox.PreserveNames()]
std_fgraph.features = [gof.toolbox.PreserveNames]
class UncomputableFeature(gof.Feature):
"""A feature that ensures the graph never contains any
......@@ -165,7 +165,7 @@ class UncomputableFeature(gof.Feature):
def on_import(self, fgraph, node):
gof.op.raise_if_uncomputable(node)
std_fgraph.features.append(UncomputableFeature())
std_fgraph.features.append(UncomputableFeature)
class AliasedMemoryError(Exception):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论