#NEWLINE# def build( self , a_image , ap_image , b_image , output_shape ) : #NEWLINE# #INDENT# self . output_shape = output_shape #NEWLINE# loss = self . build_loss ( a_image , ap_image , b_image ) #NEWLINE# grads = K . gradients ( loss , self . net_input ) #NEWLINE# outputs = [ loss ] #NEWLINE# if ( type ( grads ) in { list , tuple } ) : #NEWLINE# #INDENT# outputs += grads #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# outputs . append ( grads ) #NEWLINE# #UNINDENT# f_inputs = [ self . net_input ] #NEWLINE# for nnf in self . feature_nnfs : #NEWLINE# #INDENT# f_inputs . append ( nnf . placeholder ) #NEWLINE# #UNINDENT# self . f_outputs = K . function ( f_inputs , outputs )