#NEWLINE# def getValidationModel( self , valid_set_x , valid_set_y , valid_set_sm , batch_size ) : #NEWLINE# #INDENT# self . num_valid_ngrams = valid_set_x . get_value ( borrow = True ) . shape [ 0 ] #NEWLINE# self . num_valid_batches = ( ( ( self . num_valid_ngrams - 1 ) / batch_size ) + 1 ) #NEWLINE# self . valid_model = theano . function ( inputs = [ self . ngram_start_index , self . ngram_end_index , self . sm_start_index , self . sm_end_index ] , outputs = self . classifier . sum_ll ( self . y ) , givens = { #NEWLINE# #INDENT# self . x : valid_set_x [ self . ngram_start_index : self . ngram_end_index ] , #NEWLINE# self . y : valid_set_y [ self . ngram_start_index : self . ngram_end_index ] , #NEWLINE# self . sm : valid_set_sm [ self . sm_start_index : self . sm_end_index ] , #NEWLINE# self . lr : self . learning_rate , #NEWLINE# #UNINDENT# } ) #NEWLINE# return self . valid_model