theano the first library popularly used for learning neural networks is theano although by itselftheano is not traditional machine learning or neural network learning frameworkwhat it provides is powerful set of constructs that can be used to train both normal machine learning models and neural networks theano allows us to symbolically define mathematical functions and automatically derive their gradient expression this is one of the frequently used steps in learning any machine learning model using theanowe can express our learning process with normal symbolic expressions and then theano can generate optimized functions that carry out those steps training of machine learning models is computationally intensive process especially neural networks have steep computational requirements due to both the number of learning steps involved and the non-linearity involved in them this problem is increased manifold when we decide to learn deep neural network one of the important reasons of theano being important for neural network learning is due to its capability to generate code which executes seamlessly on both cpus and gpus thus if we specify our machine learning models using theanowe are also able to get the speed advantage offered by modern day gpus in the rest of this sectionwe see how we can install theano and learn very simple neural network using the expressions provided by theano installation theano can be easily installed by using the python package manager pip or conda pip install theano often the pip installer fails on windowshence we recommend using conda install theano on the windows platform we can verify the installation by importing our newly installed package in python shell in [ ]import theano if you get no errorsthen this indicates you have successfully installed the theano library in your system theano basics (barebones versionin this sectionwe discuss some basics of the symbolic abilities offered by theano and how those can be leveraged to build some simple learning models we will not directly use theano to build neural network in this sectionbut you will know how to carry out symbolic operations in theano besides thisyou will see in the coming section that building neural networks is much easier when we use higher level library such as keras theano expresses symbolical expressions using something called tensors tensor in its simplest definition is multi-dimensional array so zero-order tensor array is scalara one-order tensor is vectorand two-order tensor is matrix now we look at how we can work on zero-order tensor or scalar by using constructs provided by theano in [ ]import numpy import theano tensor as from theano import function dscalar(' ' dscalar(' ' function([xy]zf( out[ ]array(