提交 922c73d1 authored 作者: James Bergstra's avatar James Bergstra

compile/function - updated comment for rebuild_strict

上级 5ec1191f
...@@ -46,14 +46,13 @@ def function(inputs, outputs=None, mode=None, updates=[], givens=[], ...@@ -46,14 +46,13 @@ def function(inputs, outputs=None, mode=None, updates=[], givens=[],
:returns: a callable object that will compute the outputs (given the inputs) :returns: a callable object that will compute the outputs (given the inputs)
and update the implicit function arguments according to the `updates`. and update the implicit function arguments according to the `updates`.
:param rebuild_strict: Allow givens to change the type of the inputs of the ops. This :param rebuild_strict: True (Default) is the safer and better tested setting, in which case
allow to change cpu variables with gpu variables. This could `givens` must substitute new variables with the same Type as the variables they replace.
also serve to change vector to matrix to create a minibatch version False is a you-better-know-what-you-are-doing setting, that permits `givens` to replace
of the function in some case(not tested) and to make the function variables with new variables of any Type. The consequence of changing a Type is that all
work with sparse type(not tested) or complex type(not tested). results depending on that variable may have a different Type too (the graph is rebuilt from
WARNING: not all ops can be rebuild with inputs of other type! inputs to outputs). If one of the new types does not make sense for one of the Ops in the
In that case an error will be probably raised(not tested). graph, an Exception will be raised.
STRONGLY suggested: test the generated graph in DebugMode!
:note: Regarding givens: Be careful to make sure that these substitutions are :note: Regarding givens: Be careful to make sure that these substitutions are
independent--behaviour when Var1 of one pair appears in the graph leading to Var2 in independent--behaviour when Var1 of one pair appears in the graph leading to Var2 in
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论