提交 96827176 authored 作者: James Bergstra's avatar James Bergstra

whitespace

上级 9517a606
......@@ -21,6 +21,7 @@ from theano.configdefaults import config
import logging
_logger = logging.getLogger('theano.compile.function_module')
def alias_root(v):
"""Return the variable to which v is aliased by view_maps and destroy_maps"""
if v.owner is None: return v
......@@ -35,6 +36,7 @@ def alias_root(v):
else:
return v
def view_tree_set(v, treeset):
"""Add to `treeset` all variables that are views of v, given that v is not a view"""
treeset.add(v)
......@@ -48,6 +50,7 @@ def view_tree_set(v, treeset):
if cl.outputs[opos] not in treeset:
view_tree_set(cl.outputs[opos], treeset)
def infer_reuse_pattern(env, outputs_to_disown):
"""
Given an env and a list of variables, returns the list or set of all variables which may
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论