#NEWLINE# def __init__( self , input_layer , n_filters , filter_size , weights_std , init_bias_value , stride = 1 , nonlinearity = layers . rectify , dropout = 0.0 , partial_sum = None , pad = 0 , untie_biases = False ) : #NEWLINE# #INDENT# '\n        Only the valid border mode is supported.\n\n        n_filters should be a multiple of 16\n        ' #NEWLINE# self . input_layer = input_layer #NEWLINE# self . n_filters = n_filters #NEWLINE# self . filter_size = filter_size #NEWLINE# self . weights_std = np . float32 ( weights_std ) #NEWLINE# self . init_bias_value = np . float32 ( init_bias_value ) #NEWLINE# self . stride = stride #NEWLINE# self . nonlinearity = nonlinearity #NEWLINE# self . dropout = dropout #NEWLINE# self . partial_sum = partial_sum #NEWLINE# self . pad = pad #NEWLINE# self . untie_biases = untie_biases #NEWLINE# self . mb_size = self . input_layer . mb_size #NEWLINE# self . input_shape = self . input_layer . get_output_shape ( ) #NEWLINE# self . filter_shape = ( self . input_shape [ 0 ] , filter_size , filter_size , n_filters ) #NEWLINE# self . W = layers . shared_single ( 4 ) #NEWLINE# if self . untie_biases : #NEWLINE# #INDENT# self . b = layers . shared_single ( 3 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . b = layers . shared_single ( 1 ) #NEWLINE# #UNINDENT# self . params = [ self . W , self . b ] #NEWLINE# self . bias_params = [ self . b ] #NEWLINE# self . reset_params ( ) #NEWLINE# self . filter_acts_op = FilterActs ( stride = self . stride , partial_sum = self . partial_sum , pad = self . pad )