提交 26282f7f authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Try to clarify docstring.

上级 36e6649e
...@@ -346,12 +346,16 @@ def MergeOptMerge(opt): ...@@ -346,12 +346,16 @@ def MergeOptMerge(opt):
def pre_constant_merge(vars): def pre_constant_merge(vars):
""" """
Merge constants before the Theano variables in the list `vars` Merge constants in the subgraph used to compute nodes in `vars`.
Modify the nodes that are in the path to create out.
:note: This don't change node that are in an env. `vars` is a list of nodes, and we want to merge together nodes
This is used to pre-merge node generated in an optimization that are constant inputs used to compute nodes in that list.
that we don't want DebugMode to check as there is too many
:note: This function will ignore nodes that are in an env.
It is used to pre-merge nodes generated inside an optimization,
before it is inserted in the env.
It is useful if there are many such replacements to make,
so that DebugMode will not check each of them.
""" """
seen_var = set() seen_var = set()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论