>>> import theano
>>> a = theano.tensor.vector("a") # declare symbolic variable>>> b = a + a ** 10# build symbolic expression>>> f = theano.function([a], b) # compile function>>> print(f([0, 1, 2])) # prints `array([0,2,1026])`
[ 0.2.1026.]
>>> theano.printing.pydotprint(b, outfile="./pics/symbolic_graph_unopt.png", var_with_name_simple=True)
The output file is available at ./pics/symbolic_graph_unopt.png
>>> theano.printing.pydotprint(f, outfile="./pics/symbolic_graph_opt.png", var_with_name_simple=True)
The output file is available at ./pics/symbolic_graph_opt.png