import tensorflow as tf

        opt_denoise = self.optimizer_func(self.hparams.learning_rate)
        opt_ranker = self.optimizer_func(self.ranker_learning_rate)

        denoise_updates = opt_denoise.apply_gradients(zip(denoise_gradients, denoise_params),
                                            global_step=self.global_step)
        ranker_updates = opt_ranker.apply_gradients(zip(ranking_model_gradients, ranking_model_params))

        self.updates = tf.group(denoise_updates, ranker_updates)

    def DenoisingNet(self, list_size, forward_only=False, scope=None):
        with tf.variable_scope(scope or "denoising_model"):
            # If we are in testing, do not compute propensity
            if forward_only:
                return tf.ones_like(self.output)#, tf.ones_like(self.output)
            input_vec_size = list_size*4

            def propensity_network(input_data, index):
                reuse = None if index < 1 else True
                propensity_initializer = tf.constant_initializer(0.001) if self.hparams.constant_propensity_initialization else None
                with tf.variable_scope("propensity_network", initializer=propensity_initializer,
                                                 reuse=reuse):
                    output_data = input_data
                    current_size = input_vec_size
                    output_sizes = [
                        int((list_size+1)/2) + 1, 
                        int((list_size+1)/4) + 1,
