import tensorflow as tf

      self.sess_train = sess
      with tf.control_dependencies(self.update_ops):
        self.train_op = optimizer.apply_gradients(grads_pruned, global_step=self.global_step)
      self.summary_op = tf.summary.merge_all()
      self.log_op = [lrn_rate, loss, pr_trainable, pr_maskable] + list(metrics.values())
      self.log_op_names = ['lr', 'loss', 'pr_trn', 'pr_msk'] + list(metrics.keys())
      self.init_op = tf.variables_initializer(self.vars)
      self.init_opt_op = tf.variables_initializer(optimizer_base.variables())
      if FLAGS.enbl_multi_gpu:
        self.bcast_op = mgw.broadcast_global_variables(0)
      self.saver_train = tf.train.Saver(self.vars)

