提交 39135ff6 authored 作者: Frederic's avatar Frederic

pep8 and docstring format

上级 99f7fff7
...@@ -289,17 +289,16 @@ class FunctionGraph(utils.object2): ...@@ -289,17 +289,16 @@ class FunctionGraph(utils.object2):
Parameters Parameters
---------- ----------
r r : Variable
Variable. The clients of r will be removed.
clients_to_remove clients_to_remove : List of (op, i) pairs
List of (op, i) pairs such that node.inputs[i] is not r anymore. List of (op, i) pairs such that node.inputs[i] is not r anymore.
prune prune : bool
If prune is True, it remove r from this fgraph if it don't If prune is True, it remove r from this fgraph if it don't
have clients left. have clients left.
Returns Returns
------- -------
True if r is still in the fgraph and need to be pruned True if r is still in the fgraph and need to be pruned
later. This can happen only when prune is False. A second call later. This can happen only when prune is False. A second call
to this method with an empty list for clients_to_remove and to this method with an empty list for clients_to_remove and
...@@ -491,7 +490,6 @@ class FunctionGraph(utils.object2): ...@@ -491,7 +490,6 @@ class FunctionGraph(utils.object2):
assert node.fgraph is self assert node.fgraph is self
self.execute_callbacks('on_import', node, reason) self.execute_callbacks('on_import', node, reason)
# change input # # change input #
def change_input(self, node, i, new_r, reason=None): def change_input(self, node, i, new_r, reason=None):
""" """
...@@ -536,7 +534,7 @@ class FunctionGraph(utils.object2): ...@@ -536,7 +534,7 @@ class FunctionGraph(utils.object2):
# transaction will be reverted later. # transaction will be reverted later.
self.execute_callbacks('on_change_input', node, i, self.execute_callbacks('on_change_input', node, i,
r, new_r, reason=reason) r, new_r, reason=reason)
prune = self.__remove_clients__(r, [], True) self.__remove_clients__(r, [], True)
# replace # # replace #
def replace(self, r, new_r, reason=None, verbose=None): def replace(self, r, new_r, reason=None, verbose=None):
......
...@@ -375,8 +375,8 @@ class _tensor_py_operators(object): ...@@ -375,8 +375,8 @@ class _tensor_py_operators(object):
If `target` is `'cpu'` this will transfer to a TensorType (if If `target` is `'cpu'` this will transfer to a TensorType (if
not already one). Other types may define additional targets. not already one). Other types may define additional targets.
Paramters Parameters
--------- ----------
target : str target : str
The desired location of the output variable The desired location of the output variable
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论