#NEWLINE# def _gradient_function( self ) : #NEWLINE# #INDENT# if ( not self . _gradient_func ) : #NEWLINE# #INDENT# params = self . network . parameters #NEWLINE# inputs = ( self . network . input_variables + self . network . target_variables ) #NEWLINE# self . _gradient_func = theano . function ( inputs , T . grad ( self . cost , params ) , allow_input_downcast = True , mode = theano . Mode ( linker = THEANO_LINKER ) ) #NEWLINE# #UNINDENT# return self . _gradient_func