提交 8520d4df authored 作者: Pierre Luc Carrier's avatar Pierre Luc Carrier

Updated documentation to explain the necessity of c_support_code() and c_support_code_apply()

上级 d28733a8
......@@ -383,6 +383,15 @@ commonly used.
while ``c_support_code()`` is for support code that is not specific to
each apply.
Both ``c_support_code()`` and ``c_support_code_apply ()`` are necessary
because a Theano op can be used more than once in a given Theano
function. For example, an op that adds two matrices could be used at some
point in the Theano function to add matrices of integers and, at another
point, to add matrices of doubles. Because the dtype of the inputs and
outputs can change between different applies of the op, any support code
that relies on a certain dtype is specific to a given apply of the op and
should therefore be defined in ``c_support_code_apply()``.
.. method:: c_code_cache_version()
Returns a tuple of integers representing the version of the C code in this
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论