提交 8e8e6cbe authored 作者: carriepl's avatar carriepl

pep8 in scan_utils

上级 319c583a
...@@ -121,7 +121,7 @@ class until(object): ...@@ -121,7 +121,7 @@ class until(object):
of code to fail). of code to fail).
""" """
def __init__(self, condition): def __init__(self, condition):
self.condition = tensor.as_tensor_variable(condition) self.condition = tensor.as_tensor_variable(condition)
assert self.condition.ndim == 0 assert self.condition.ndim == 0
...@@ -131,7 +131,7 @@ def traverse(out, x, x_copy, d, visited=None): ...@@ -131,7 +131,7 @@ def traverse(out, x, x_copy, d, visited=None):
""" """
Function used by scan to parse the tree and figure out which nodes Function used by scan to parse the tree and figure out which nodes
it needs to replace. it needs to replace.
There are two options : There are two options :
1) x and x_copy or on host, then you would replace x with x_copy 1) x and x_copy or on host, then you would replace x with x_copy
2) x is on gpu, x_copy on host, then you need to replace 2) x is on gpu, x_copy on host, then you need to replace
...@@ -201,7 +201,7 @@ def clone(output, ...@@ -201,7 +201,7 @@ def clone(output,
copy_inputs=DEPRECATED_ARG): copy_inputs=DEPRECATED_ARG):
""" """
Function that allows replacing subgraphs of a computational graph. Function that allows replacing subgraphs of a computational graph.
It returns a copy of the initial subgraph with the corresponding It returns a copy of the initial subgraph with the corresponding
substitutions. substitutions.
...@@ -1324,7 +1324,7 @@ def forced_replace(out, x, y): ...@@ -1324,7 +1324,7 @@ def forced_replace(out, x, y):
Check all internal values of the graph that compute the variable ``out`` Check all internal values of the graph that compute the variable ``out``
for occurrences of values identical with ``x``. If such occurrences are for occurrences of values identical with ``x``. If such occurrences are
encountered then they are replaced with variable ``y``. encountered then they are replaced with variable ``y``.
Parameters Parameters
---------- ----------
out : Theano Variable out : Theano Variable
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论