import tensorflow as tf

                    output_vars1 = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope="task_dependent")
                    output_vars2 = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope="task_independent/Variable_1")
                    var_list = [output_vars1, output_vars2]

                train_op = tf.train.AdamOptimizer(
                    # learning_rate=self.params["learning_rate"]
                    # **self.params.get("optimizer_params", {})
                    # learning_rate=learning_rate
                    **optimizer_params
                ).minimize(loss, global_step=global_step, var_list=var_list)

                return tf.estimator.EstimatorSpec(
                    self.mode, loss=loss, train_op=train_op
                )
