#NEWLINE# def __init__( self , numpy_rng , theano_rng = None , cfg_si = None , cfg_adapt = None ) : #NEWLINE# #INDENT# self . x = T . matrix ( 'x' ) #NEWLINE# self . y = T . ivector ( 'y' ) #NEWLINE# self . feat_dim = cfg_si . n_ins #NEWLINE# self . ivec_dim = cfg_adapt . n_ins #NEWLINE# self . iv = self . x [ : , self . feat_dim : ( self . feat_dim + self . ivec_dim ) ] #NEWLINE# self . feat = self . x [ : , 0 : self . feat_dim ] #NEWLINE# self . params = [ ] #NEWLINE# self . delta_params = [ ] #NEWLINE# dnn_adapt = DNN ( numpy_rng = numpy_rng , theano_rng = dnn_adapt , cfg = cfg_adapt , input = self . iv ) #NEWLINE# self . dnn_adapt = dnn_adapt #NEWLINE# linear_func = ( lambda x : x ) #NEWLINE# adapt_output_layer = HiddenLayer ( rng = numpy_rng , input = dnn_adapt . layers [ ( - 1 ) ] . output , n_in = cfg_adapt . hidden_layers_sizes [ ( - 1 ) ] , n_out = self . feat_dim , activation = linear_func ) #NEWLINE# dnn_adapt . layers . append ( adapt_output_layer ) #NEWLINE# dnn_adapt . params . extend ( adapt_output_layer . params ) #NEWLINE# dnn_adapt . delta_params . extend ( adapt_output_layer . delta_params ) #NEWLINE# dnn_si = DNN ( numpy_rng = numpy_rng , theano_rng = theano_rng , cfg = cfg_si , input = ( self . feat + dnn_adapt . layers [ ( - 1 ) ] . output ) ) #NEWLINE# self . dnn_si = dnn_si #NEWLINE# self . finetune_cost = dnn_si . logLayer . negative_log_likelihood ( self . y ) #NEWLINE# self . errors = dnn_si . logLayer . errors ( self . y )