(layers, field, regex=None)
return matches
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
Print out the layer names in the model with some
        options for filtering the results.
Print out the layer names in the model with some options for filtering the results .
def find_layers(layers, field, regex=None):
        """
        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
        """
        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
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