import tensorflow as tf

        G = tf.Graph()
        with G.as_default():
            # Data input
            X = tf.placeholder(tf.float32, [None, input_node], name = 'x-Input')
            y_ = tf.placeholder(tf.float32, [None, output_node], name = 'label-Input')
            # hidden layers
            self.nnweights = [] # collect weights of network
            prev_node = input_node
            prev_x = X
            for i in range(len(hidden_layers_node)):
                layer_name = 'layer' + str(i+1)
                with tf.variable_scope(layer_name, reuse=tf.AUTO_REUSE):
                    weights = tf.get_variable('weights', [prev_node, hidden_layers_node[i]], 
                                              initializer=tf.truncated_normal_initializer(stddev=0.1))
                    self.nnweights.append(weights)

                    biases = tf.get_variable('biases', [hidden_layers_node[i]],
                                             initializer=tf.constant_initializer(0.0))

                    layer_out = tf.nn.dropout(tf.matmul(prev_x, weights) + biases, dropout_keep_prob)

                    if activation == 'relu':
                        layer_out = tf.nn.relu(layer_out)
                    elif activation == 'sigmoid':
                        layer_out = tf.nn.sigmoid(layer_out)
                    elif activation == 'tanh':
