An the end of all the runs of the demo, there's a traceback...
pauljbernard opened this issue · comments
An the end of all the runs of the demo, there's a traceback...
Train on 60000 samples, validate on 10000 samples
Epoch 1/1
60000/60000 [==============================] - 54s - loss: 0.2622 - acc: 0.9143 - val_loss: 2.6748 - val_acc: 0.3584
Generation 10: best accuracy: 0.9853 average: 0.8218 std: 0.3026
Traceback (most recent call last):
File "test.py", line 48, in
model, loss, accuracy = devol.run(dataset, num_generations, population_size, num_epochs)
File "/home//projects/devol/devol.py", line 107, in run
return self.genome_handler.decode_best(self.datafile)
File "/home//projects/devol/genome_handler.py", line 217, in decode_best
return self.decode(self.best_genome(csv_path, metric, False))
File "/home//projects/devol/genome_handler.py", line 209, in best_genome
row = list(data[:, col]).index(best(data[:, col]))
ValueError: nan is not in list
Looks like a NaN crept into the mix somewhere?
@pauljbernard do pass a path for your genome csv
file? If so, make sure that you clear it each time before you run again. Otherwise the columns headers will show up in the middle of the file and it will confuse the decoder.
I thought about clearing automatically but was afraid of unintentionally clearing hard-earned genome data. Maybe we can just disallow it instead.