'Print out the layer names in the model with some
options for filtering the results.
Arguments:
layers (dict): model configuration dictionary
field (str, optional): the configuration field to file against
(e.g. layer \'name\')
regex (str, optional): regular expression to apply to field
to file the results (e.g. "conv")
Returns:
list of dict: Layer config dictionary'

@staticmethod
def find_layers(layers, field, regex=None):

    matches = []
    for l in layers['layers']:
        if (field in l['config']):
            value = l['config'][field]
            if ((regex is None) or regex.match(value)):
                matches.append(value)
        if ((type(l) is dict) and ('layers' in l['config'])):
            matches.extend(ModelDescription.find_layers(l['config'], field, regex=regex))
    return matches
