INNER CODE UNIT · Python
GenomeHandler
joeddav/devol · devol/genome_handler.py:10
class GenomeHandler:
"""
Defines the configuration and handles the conversion and mutation of
individual genomes. Should be created and passed to a `DEvol` instance.
---
Genomes are represented as fixed-with lists of integers corresponding
to sequential layers and properties. A model with 2 convolutional layers
and 1 dense layer would look like:
[<conv layer><conv layer><dense layer><optimizer>]
The makeup of the convolutional layers and dense layers is defined in the
GenomeHandler below under self.convolutional_layer_shape and
self.dense_layer_shape. <optimizer> consists of just one property.
"""
def __init__(self, max_conv_layers, max_dense_layers, max_filters,