Beispiel #1
0
    def fitness(self, nn_chromosome: BackPropModel, train_dataset,
                val_dataset):
        print("train")
        nn_chromosome.train(train_dataset)
        print("test")
        accuracy = nn_chromosome.test(val_dataset)

        print(accuracy)
        return accuracy
Beispiel #2
0
 def train_best(self, best: BackPropModel, dataset):
     best.args.epochs = 1
     best.train(dataset)
     best.args.epochs = 1