def METHOD_NAME(init_weights):
    tf_compat.reset_default_graph()
    n_inputs = 28 * 28
    n_hidden1 = 300
    n_hidden2 = 100
    n_outputs = 10
    X = tf_compat.placeholder(tf_compat.float32, shape=(None, n_inputs), name="X")
    def neuron_layer(X, n_neurons, name, activation=None):
        with tf_compat.name_scope(name):
            n_inputs = int(X.get_shape()[1])
            stddev = 2 / np.sqrt(n_inputs)
            init = tf_compat.truncated_normal((n_inputs, n_neurons), stddev=stddev)
            W = tf_compat.Variable(init, name="kernel")
            b = tf_compat.Variable(tf_compat.zeros([n_neurons]), name="bias")
            Z = tf_compat.matmul(X, W) + b
            if activation is not None:
                return activation(Z)
            else:
                return Z
    with tf_compat.name_scope("dnn"):
        hidden1 = neuron_layer(
            X, n_hidden1, name="hidden1", activation=tf_compat.nn.relu
        )
        hidden2 = neuron_layer(
            hidden1, n_hidden2, name="hidden2", activation=tf_compat.nn.relu
        )
        neuron_layer(hidden2, n_outputs, name="outputs")
        return tf_compat.get_default_graph()