def adv_train_generator(self, g_step):
        """
        Train the generator with mediator rewards
        """
        g_loss = []
        for step in range(g_step):
            inp, target = GenDataIter.prepare(self.gen.sample(cfg.batch_size, cfg.batch_size), gpu=cfg.CUDA)

            # ===Train===
            rewards = self.dis(inp, self.dis.init_hidden(cfg.batch_size))
            loss = self.gen.get_loss(inp, rewards)
            self.optimize(self.gen_adv_opt, loss)
            g_loss.append(loss.item())

        return np.mean(g_loss)

        Train the generator with mediator rewards
        
instructor/real_data/cot_instructor.py