提交 dce8d307 authored 作者: Frederic Bastien's avatar Frederic Bastien

talk about Shared Variable in the doc comparaison about theano vs c.

上级 062a437c
......@@ -12,7 +12,8 @@ analogue in a statically typed language such as C:
Theano C
=============== ===========================================================
Apply function application / function call
Variable function data / variable
Variable local function data / variable
Shared Variable global function data / variable
Op operations carried out in computation / function definition
Type data types
Module class
......@@ -21,19 +22,22 @@ Module class
For example:
.. code-block:: c
int d = 0;
int main(int a) {
int b = 3;
int c = f(b)
d = b + c;
return g(a, c);
}
Based on this code snippet, we can relate ``f`` and ``g`` to Ops, ``a``,
``b`` and ``c`` to Variables, ``g(a, c)`` and ``f(b)`` (taken as meaning
the action of computing ``f`` or ``g`` on their respective inputs) to
``b`` and ``c`` to Variables, ``d`` to Shared Variable, ``g(a, c)``,
``f(b)`` and ``d = b + c`` (taken as meaning
the action of computing ``f``, ``g`` or ``+``on their respective inputs) to
Applies. Lastly, ``int`` could be interpreted as the Theano Type of the
Variables ``a`` and ``b``.
Variables ``a``, ``b``, ``c`` and ``d``.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论