Theano vs. C

We describe some of the patterns in Theano, and present their closestanalogue in a statically typed language such as C:

TheanoC
Applyfunction application / function call
Variablelocal function data / variable
Shared Variableglobal function data / variable
Opoperations carried out in computation / function definition
Typedata types

For example:

  1. int d = 0;
  2.  
  3. int main(int a) {
  4. int b = 3;
  5. int c = f(b)
  6. d = b + c;
  7. return g(a, c);
  8. }

Based on this code snippet, we can relate f and g to Ops, a,b and c to Variables, d to Shared Variable, g(a, c),f(b) and d = b + c (taken as meaningthe action of computing f, g or + on their respective inputs) toApplies. Lastly, int could be interpreted as the Theano Type of theVariables a, b, c and d.