conv_sizes: List of convolutional layer sizes
dense_sizes: List of dense layer sizes
network_spec = list()
// Convolution layers
for size in conv_sizes:
network_spec.append(dict(type="conv2d", size=size))
// First layer with larger window
network_spec[0]["window"] = 5
// Global max-pooling
network_spec.append(dict(type="global_pooling", pooling="max"))
// Dense layers
for size in dense_sizes:
network_spec.append(dict(type="dense", size=size))