- Theano - Discussion
- Theano - Useful Resources
- Theano - Quick Guide
- Theano - Conclusion
- Theano - Trivial Training Example
- Theano - Functions
- Theano - Shared Variables
- Theano - Variables
- Theano - Data Types
- Theano - Computational Graph
- Theano - Expression for Matrix Multiplication
- Theano - A Trivial Theano Expression
- Theano - Installation
- Theano - Introduction
- Theano - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Theano - Functions
Theano function acts pke a hook for interacting with the symbopc graph. A symbopc 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 pst of input variables and the second parameter y is the pst of output variables.
Having now understood the basics of Theano, let us begin Theano coding with a trivial example.
Advertisements