- Theano Tutorial
- Theano - Home
- Theano - Introduction
- Theano - Installation
- Theano - A Trivial Theano Expression
- Theano - Expression for Matrix Multiplication
- Theano - Computational Graph
- Theano - Data Types
- Theano - Variables
- Theano - Shared Variables
- Theano - Functions
- Theano - Trivial Training Example
- Theano - Conclusion
- Theano Useful Resources
- Theano - Quick Guide
- Theano - Useful Resources
- Theano - Discussion
Theano - Functions
Theano function acts like a hook for interacting with the symbolic graph. A symbolic graph is compiled into a highly efficient execution code. It achieves this by restructuring mathematical equations to make them faster. It compiles some parts of the expression into C language code. It moves some tensors to the GPU, and so on.
The efficient compiled code is now given as an input to the Theano function. When you execute the Theano function, it assigns the result of computation to the variables specified by us. The type of optimization may be specified as FAST_COMPILE or FAST_RUN. This is specified in the environment variable THEANO_FLAGS.
A Theano function is declared using the following syntax −
f = theano.function ([x], y)
The first parameter [x] is the list of input variables and the second parameter y is the list of output variables.
Having now understood the basics of Theano, let us begin Theano coding with a trivial example.
Kickstart Your Career
Get certified by completing the courseGet Started