import tensorflow as tf


            w = variable_with_weight_decay([n_in, output_dim], initializer, l2_strength)

            variable_summaries(w)

            if isinstance(bias, float):
                bias = tf.get_variable("biases", [output_dim], tf.float32, tf.constant_initializer(bias))

            variable_summaries(bias)

            output = tf.nn.bias_add(tf.matmul(x, w), bias)

            return output

    def _bn(self, name, x):
        with tf.variable_scope(name):
            moving_average_decay = 0.9
            decay = moving_average_decay

            batch_mean, batch_var = tf.nn.moments(x, [0, 1, 2])

            mu = tf.get_variable('mu', batch_mean.shape, dtype=tf.float32,
                                 initializer=tf.zeros_initializer(), trainable=False)
            tf.add_to_collection(tf.GraphKeys.GLOBAL_VARIABLES, mu)
            tf.add_to_collection('mu_sigma_bn', mu)
            sigma = tf.get_variable('sigma', batch_var.shape, dtype=tf.float32,
                                    initializer=tf.ones_initializer(), trainable=False)
            tf.add_to_collection(tf.GraphKeys.GLOBAL_VARIABLES, sigma)
            tf.add_to_collection('mu_sigma_bn', sigma)
            beta = tf.get_variable('beta', batch_mean.shape, dtype=tf.float32,
