neural_network.py
def configure_classifier(self, number_of_inputs, number_of_classes, hidden_layers = 5,
                               activation_function_type = "tanh",batch_size = -1, type = "classifier",anneal = "default",
                             annealing_hyperparameters=[1, 1],epsilon = 1e-5):
        """Sets training and neural network configurations"""
        self.layers = [number_of_inputs] + hidden_layers + [number_of_classes] # rewrite this as a numpy array
        self.model = {}
        self.weights = [np.random.randn(self.layers[i],
                                        self.layers[i+1]) / np.sqrt(self.layers[i]) for i in range(len(self.layers)-1)]
        self.biases = [np.zeros((1, self.layers[i+1])) for i in range(len(self.layers)-1)]
        self.a = [np.zeros((1, self.layers[i+1])) for i in range(len(self.layers)-1)]
        self.batch_size = batch_size
        # Consider passing function via arguments
        self.anneal = learning_scheme(epsilon,anneal,annealing_hyperparameters)
        self.set_output(type)
        self.activation_function = activation_function_interface(activation_function_type)
Sets training and neural network configurations
Sets training and neural network configurations
Sets training and neural network configurations
def configure_classifier(self, number_of_inputs, number_of_classes, hidden_layers = 5,
                               activation_function_type = "tanh",batch_size = -1, type = "classifier",anneal = "default",
                             annealing_hyperparameters=[1, 1],epsilon = 1e-5):
        self.layers = [number_of_inputs] + hidden_layers + [number_of_classes] 
        self.model = {}
        self.weights = [np.random.randn(self.layers[i],
                                        self.layers[i+1]) / np.sqrt(self.layers[i]) for i in range(len(self.layers)-1)]
        self.biases = [np.zeros((1, self.layers[i+1])) for i in range(len(self.layers)-1)]
        self.a = [np.zeros((1, self.layers[i+1])) for i in range(len(self.layers)-1)]
        self.batch_size = batch_size
        self.anneal = learning_scheme(epsilon,anneal,annealing_hyperparameters)
        self.set_output(type)
        self.activation_function = activation_function_interface(activation_function_type)
def configure_classifier ( self , number_of_inputs , number_of_classes , hidden_layers = 5 , activation_function_type = "tanh" , batch_size = - 1 , type = "classifier" , anneal = "default" , annealing_hyperparameters = [ 1 , 1 ] , epsilon = 1e-5 ) : self . layers = [ number_of_inputs ] + hidden_layers + [ number_of_classes ] self . model = { } self . weights = [ np . random . randn ( self . layers [ i ] , self . layers [ i + 1 ] ) / np . sqrt ( self . layers [ i ] ) for i in range ( len ( self . layers ) - 1 ) ] self . biases = [ np . zeros ( ( 1 , self . layers [ i + 1 ] ) ) for i in range ( len ( self . layers ) - 1 ) ] self . a = [ np . zeros ( ( 1 , self . layers [ i + 1 ] ) ) for i in range ( len ( self . layers ) - 1 ) ] self . batch_size = batch_size self . anneal = learning_scheme ( epsilon , anneal , annealing_hyperparameters ) self . set_output ( type ) self . activation_function = activation_function_interface ( activation_function_type )
Sets training and neural network configurations
Sets training and neural network configurations
"""Sets training and neural network configurations""" # rewrite this as a numpy array # Consider passing function via arguments
self
number_of_inputs
number_of_classes
hidden_layers
activation_function_type
batch_size
type
anneal
annealing_hyperparameters
epsilon