提交 8109ca19 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

fixed comment

made extend call attach_feature
上级 91c05af8
...@@ -50,8 +50,8 @@ class FunctionGraph(utils.object2): ...@@ -50,8 +50,8 @@ class FunctionGraph(utils.object2):
It can also be extended with new features using It can also be extended with new features using
FunctionGraph.attach_feature(<toolbox.Feature instance>). FunctionGraph.attach_feature(<toolbox.Feature instance>).
See toolbox.Feature for event types and documentation. See toolbox.Feature for event types and documentation.
Extra feature allow the FunctionGraph to verify new properties of Extra features allow the FunctionGraph to verify new properties of
as a graph is optimized. a graph as it is optimized.
# TODO: are there other things features can do to the fgraph? # TODO: are there other things features can do to the fgraph?
Historically, the FunctionGraph was called an Env. Keep this in mind Historically, the FunctionGraph was called an Env. Keep this in mind
...@@ -434,6 +434,7 @@ class FunctionGraph(utils.object2): ...@@ -434,6 +434,7 @@ class FunctionGraph(utils.object2):
def extend(self, feature): def extend(self, feature):
warnings.warn("FunctionGraph.extend is deprecatd. It has been " warnings.warn("FunctionGraph.extend is deprecatd. It has been "
"renamed to FunctionGraph.attach_feature") "renamed to FunctionGraph.attach_feature")
return self.attach_feature(feature)
def attach_feature(self, feature): def attach_feature(self, feature):
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论