import tensorflow as tf

                    self.mixed_label = tf.gather(self.mixed_label, mixed_idx)

                    self.mixed_pred, mixed_end_points = self.get_pred(self.mixed_pc)
                    self.mixed_loss = self.get_loss(self.mixed_pred, self.mixed_label, mixed_end_points)

            with tf.variable_scope('discriminator') as scope:
                self.real_prob, self.real_logit = self.discriminator(self.real_pc_rotated, scope=scope, **disc_kwargs)
                self.synthetic_prob, self.synthetic_logit = self.discriminator(self.gen_out_rotated, reuse=True, scope=scope, **disc_kwargs)
            
            # Compute WGAN losses
            self.loss_d = tf.reduce_mean(self.synthetic_logit) - tf.reduce_mean(self.real_logit) # comparing rotated fake and real images
            self.loss_g = -tf.reduce_mean(self.synthetic_logit)

            # Add rotation loss
            if self.ms_task:
                self.g_ms_loss = tf.abs(self.gen_out_rot_loss - self.real_pc_rot_loss, name = 'abs')
                self.d_ms_loss = self.mixed_loss
                self.loss_d_rot = self.loss_d + self.weight_rotation_loss_d * self.d_ms_loss
                self.loss_g_rot = self.loss_g + self.weight_rotation_loss_g * self.g_ms_loss
            else:
                self.loss_d_rot = self.loss_d + self.weight_rotation_loss_d * self.real_pc_rot_loss
                self.loss_g_rot = self.loss_g + self.weight_rotation_loss_g * self.gen_out_rot_loss
            
            # Compute gradient penalty at interpolated points
            ndims = self.real_pc.get_shape().ndims #(1024, 3)
            alpha = tf.random_uniform(shape=[self.batch_size] + [1] * (ndims - 1), minval=0., maxval=1.)
            differences = self.generator_out - self.real_pc
            interpolates = self.real_pc + (alpha * differences)

            with tf.variable_scope('discriminator') as scope:
