import os if os.environ.get('DJANGO_SETTINGS_MODULE'): print "Initializing Django..." if not os.path.exists('app/settings.py'): os.chdir('..') print "(in directory %s)" % os.getcwd() try: from django_extensions import management except BaseException as e:
There is a [very good paper] published by James Bergstra et al, Proceedings of the 9th PYTHON IN SCIENCE CONF. (SCIPY 2010) describing the idea of Theano and how it works behind the scenes.
In fact, it's abstract is already quite informative. Let's go through it step by step:
Abstract — Theano is a compiler for mathematical expressions in Python that combines the convenience of NumPy’s syntax with the speed of optimized native machine language.