import tensorflow as tf


            train_vars = tf.trainable_variables()
            d_params = [v for v in train_vars if v.name.startswith(name + '/discriminator/')]
            g_params = [v for v in train_vars if v.name.startswith(name + '/generator/')]
            rot_params = [v for v in train_vars if '/rotation/' in v.name] #slightly suspecting that this part is incorrect
            self.opt_d = self.optimizer(self.init_lr, beta, self.loss_d_rot, d_params)
            self.opt_g = self.optimizer(self.init_lr, beta, self.loss_g_rot, g_params) #used loss_g + rot_loss to update
            self.opt_pred = self.optimizer(lr_pred, beta, self.real_pc_rot_loss, rot_params, batch) #only use real pics to update

            self.saver = tf.train.Saver(tf.global_variables(), max_to_keep=None)
            self.init = tf.global_variables_initializer()

            #Launch the session
            config = tf.ConfigProto(allow_soft_placement = True)
            config.gpu_options.allow_growth = True
            self.sess = tf.Session(config=config, graph=self.graph)
            self.sess.run(self.init)

