def evaluation(self, eval_type):
        """Evaluation all children, update child score. Note that the eval data should be the same"""
        eval_samples = [self.gen.sample(cfg.eval_b_num * cfg.batch_size, cfg.max_bn * cfg.batch_size, label_i=i) for i
                        in range(cfg.k_label)]

        # Fd
        if cfg.lambda_fd != 0:
            nll_div = []
            for label_i in range(cfg.k_label):
                gen_data = GenDataIter(eval_samples[label_i])
                nll_div.append(NLL.cal_nll_with_label(self.gen, gen_data.loader, label_i, self.mle_criterion))
            Fd = sum(nll_div)
        else:
            Fd = 0

        # Fq
        if 'bleu' in eval_type:
            bleu_score = []
            for i in range(cfg.k_label):
                bleu_score.append(self.bleu[i].get_score(given_gram=int(eval_type[-1])))

            Fq = sum(bleu_score)
        elif 'Ra' in eval_type:
            g_loss = 0
            for i in range(cfg.k_label):
                g_loss += torch.sigmoid(self.eval_d_out_fake[i] - torch.mean(self.eval_d_out_real[i])).sum()
            Fq = g_loss.item()
        else:
            raise NotImplementedError("Evaluation '%s' is not implemented" % eval_type)

        score = cfg.lambda_fq * Fq + cfg.lambda_fd * Fd
        return Fq, Fd, score
Evaluation all children, update child score. Note that the eval data should be the same
instructor/real_data/catgan_instructor.py