def define_nn(self, n_neurons, hidden, m, nb_hidden_layer, learning_rate):
    classifier = Sequential()
    if (hidden == True):
        layer0 = Dense(n_neurons, activation='sigmoid', kernel_initializer=initializers.random_normal(stddev=0.03, seed=98765), input_dim=m)
        classifier.add(layer0)
        nb = 1
        while (nb < nb_hidden_layer):
            layer_nb = Dense(n_neurons, activation='sigmoid', kernel_initializer=initializers.random_normal(stddev=0.03, seed=98765))
            classifier.add(layer_nb)
            nb += 1
    layer1 = Dense(1, activation='sigmoid', kernel_initializer=initializers.random_normal(stddev=0.03, seed=98765), kernel_regularizer=regularizers.l2(0.5))
    classifier.add(layer1)
    sgd = optimizers.SGD(lr=learning_rate, clipvalue=0.5)
    classifier.compile(optimizer=sgd, loss='binary_crossentropy', metrics=['accuracy'])
    return classifier
def define_nn(self, n_neurons, hidden, m, nb_hidden_layer, learning_rate):
    classifier = Sequential()
    if (hidden == True):
        layer0 = Dense(n_neurons, activation='sigmoid', kernel_initializer=initializers.random_normal(stddev=0.03, seed=98765), input_dim=m)
        classifier.add(layer0)
        nb = 1
        while (nb < nb_hidden_layer):
            layer_nb = Dense(n_neurons, activation='sigmoid', kernel_initializer=initializers.random_normal(stddev=0.03, seed=98765))
            classifier.add(layer_nb)
            nb += 1
    layer1 = Dense(1, activation='sigmoid', kernel_initializer=initializers.random_normal(stddev=0.03, seed=98765), kernel_regularizer=regularizers.l2(0.5))
    classifier.add(layer1)
    sgd = optimizers.SGD(lr=learning_rate, clipvalue=0.5)
    classifier.compile(optimizer=sgd, loss='binary_crossentropy', metrics=['accuracy'])
    return classifier