from tensorflow.python.ops import control_flow_ops

          t_vars['g_vars'], self.g_losses[-1], g_optimizer, gradient_noise_scale=0.0)
    else:
      self.capped_d_grads = self._clip_grad_norms(
          d_optimizer.compute_gradients(self.d_losses[-1], t_vars['d_vars']))
      self.capped_g_grads = self._clip_grad_norms(
          g_optimizer.compute_gradients(self.g_losses[-1], t_vars['g_vars']))
    global_step = tf.get_variable(
        'global_step', [], initializer=tf.constant_initializer(0), trainable=False)
    if self.gradient_multipliers is not None:
      with tf.name_scope('multiply_grads'):
        self.capped_d_grads = self._multiply_gradients(self.capped_d_grads,
                                                       self.gradient_multipliers)
    apply_d_gradient_op = d_optimizer.apply_gradients(self.capped_d_grads, global_step=global_step)
    apply_g_gradient_op = g_optimizer.apply_gradients(self.capped_g_grads, global_step=global_step)
    self.train_op_d = control_flow_ops.with_dependencies([apply_d_gradient_op], self.d_losses[-1])
    self.train_op_g = control_flow_ops.with_dependencies([apply_g_gradient_op], self.g_losses[-1])
