import tensorflow as tf

                                            self.n_batches_per_epoch),
                                    tf.int64, "global_epoch")

        tf.add_to_collection("global_epoch", self.global_epoch)

    # this creates an operation to add to all trainable variables a white noise of param
    # std = tf.sqrt(variance)/10
    def create_random_update_op(self):

        vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)

        update_opts = []
        for var in vars:

            _, variance = tf.nn.moments(tf.reshape(var,[-1]),axes=[0])

            normal = tf.distributions.Normal(loc=0.0, scale=tf.sqrt(variance)/10)
            white_noise = normal.sample(var.get_shape())
