from tensorflow.python.ops import control_flow_ops

      with tf.control_dependencies(update_ops):
        barrier = tf.no_op(name='update_barrier')
        self.d_losses[-1] = control_flow_ops.with_dependencies([barrier], self.d_losses[-1])
        self.g_losses[-1] = control_flow_ops.with_dependencies([barrier], self.g_losses[-1])
        self.d_loss_real = control_flow_ops.with_dependencies([barrier], self.d_loss_real)
        self.d_loss_fake = control_flow_ops.with_dependencies([barrier], self.d_loss_fake)
        self.d_loss_class = control_flow_ops.with_dependencies([barrier], self.d_loss_class)
    t_vars = self._get_vars_semi_supervised()
