'Print out the layer names in the model with some
options for filtering the results.
Arguments:
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")
Example:
layers(field=\'name\', regex=\'conv\') will return all layers
with the name containing "conv"'

def layers(self, field='name', regex=None):

    if (regex is not None):
        regex = re.compile(regex)
    return self.find_layers(self['model']['config'], field, regex=regex)
