提交 4c0c2258 authored 作者: Frederic's avatar Frederic

Added speed tip for Theano 0.6

上级 ace5e986
......@@ -42,6 +42,25 @@ space to allow to reuse them during the next call to the same Theano
function if they are of the good shape. The shape could change if the
shape of the inputs change.
Faster Small Theano function
----------------------------
.. note::
For Theano 0.6 and up.
For Theano function that don't do much work like a regular logistic
regression, the overhead of checking the input can be significant. You
can disable it by setting f.trust_input to True to remove this
check. Make sure you pass argument as what you said when compiling the
Theano function.
Also for small Theano function, you can remove more python overhead by
making a Theano function that don't take any inputs. You can use shared
variable to help you. Then you can call it like this: ``f.fn()`` or
``f.fn(n_calls=N)`` to speed up. In the last case, only the last
function output is returned.
Related Projects
----------------
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论