def _evaluation(self, pop, eval_flag):
    net_lists = []
    active_index = np.where(eval_flag)[0]
    for i in active_index:
        net_lists.append(pop[i].active_net_list())
    fp = self.eval_func(net_lists)
    for (i, j) in enumerate(active_index):
        if isinstance(fp[i], tuple):
            pop[j].eval = fp[i][0]
            pop[j].size = fp[i][1]
        else:
            pop[j].eval = fp[i]
            pop[j].size = np.inf
    evaluations_acc = np.zeros(len(pop))
    evaluations_size = np.zeros(len(pop))
    for i in range(len(pop)):
        evaluations_acc[i] = pop[i].eval
        evaluations_size[i] = pop[i].size
    self.num_eval += len(net_lists)
    return (evaluations_acc, evaluations_size)
def _evaluation(self, pop, eval_flag):
    net_lists = []
    active_index = np.where(eval_flag)[0]
    for i in active_index:
        net_lists.append(pop[i].active_net_list())
    fp = self.eval_func(net_lists)
    for (i, j) in enumerate(active_index):
        if isinstance(fp[i], tuple):
            pop[j].eval = fp[i][0]
            pop[j].size = fp[i][1]
        else:
            pop[j].eval = fp[i]
            pop[j].size = np.inf
    evaluations_acc = np.zeros(len(pop))
    evaluations_size = np.zeros(len(pop))
    for i in range(len(pop)):
        evaluations_acc[i] = pop[i].eval
        evaluations_size[i] = pop[i].size
    self.num_eval += len(net_lists)
    return (evaluations_acc, evaluations_size)