We will first implement our child network module. This module contains a class called ChildCNN, which constructs a child network given some architecture configuration, which we call cnn_dna. As mentioned previously, cnn_dna is simply a list of numbers, with each value representing a parameter of its respective convolutional layer. In our config.py, we specify the max number of layers a child network can have. For our implementation, each convolutional layer is represented by four parameters, where each corresponds to the kernel size, stride length, number of filters, and subsequent max-pooling window size.
Our ChildCNN is a class that takes the following parameters in its constructor:
- cnn_dna: The network architecture