提交 5521f956 authored 作者: khaotik's avatar khaotik

fix docstring

上级 e39e7398
...@@ -19,16 +19,20 @@ class OpFromGraph(gof.Op): ...@@ -19,16 +19,20 @@ class OpFromGraph(gof.Op):
`Op`'s perform will do the same operation as:: `Op`'s perform will do the same operation as::
orig_function(inputs, outputs, **kwargs) orig_function(inputs, outputs, **kwargs)
Currently does not support 'updates' or 'givens' argument. Currently does not support 'updates' or 'givens' argument.
Parameters Parameters
---------- ----------
inputs: list of variables inputs: list of variables
outputs: list of variables outputs: list of variables
inline: bool, optional inline: bool, optional
if True, will cause the Op's original graph being used during if True, will cause the Op's original graph being used during
compilation, otherwise will use a pre-compiled function inside. compilation, otherwise will use a pre-compiled function inside.
grad_overrides: None | undef | OpFromGraph instance | function | \ grad_overrides: None | undef | OpFromGraph instance | function | \
list of (None|undef|function), optional list of (None|undef|function), optional
Used to override default gradient routine. Used to override default gradient routine.
...@@ -44,17 +48,19 @@ class OpFromGraph(gof.Op): ...@@ -44,17 +48,19 @@ class OpFromGraph(gof.Op):
- function : must return list of Variable. - function : must return list of Variable.
- list : each function must return a single Variable. The order - list : each function must return a single Variable. The order
of the list must corresponds to inputs of the list must corresponds to inputs
rop_overrides: None | undef | OpFromGraph instance | function | \ rop_overrides: None | undef | OpFromGraph instance | function | \
list of (None|undef|function), optional list of (None|undef|function), optional
similar to grad_overrides, list order should match two list of "inputs" similar to grad_overrides, list order should match two list of "inputs"
concatenated. concatenated.
**kwargs: optional **kwargs: optional
Whenever this OfG instance is precompiled instead of inline, a call to Whenever this OfG instance is precompiled instead of inline, a call to
theano.compile.function_module.orig_function during precompile phase theano.compile.function_module.orig_function during precompile phase
will take the extra keyword args will take the extra keyword args
TODO: .. TODO:
- examples for a multi-layer mlp. where? - examples for a multi-layer mlp. where?
- __hash__, __eq__ otherwise won't merge, try - __hash__, __eq__ otherwise won't merge, try
gof.opt.is_same_graph_with_merge(op1.local_outputs, op2, gof.opt.is_same_graph_with_merge(op1.local_outputs, op2,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论