def theano_simplify(fgraph):
 mode = theano.compile.get_default_mode().excluding('fusion')
 fgraph = fgraph.clone()
 mode.optimizer.optimize(fgraph)
 return fgraph

def theano_simplify ( fgraph ) : mode = theano . compile . get_default_mode ( ) . excluding ( 'fusion' ) fgraph = fgraph . clone ( ) mode . optimizer . optimize ( fgraph ) return fgraph
simplify a theano computation .