def _get_conv_layers(layer, result=None):
 if (result is None):
  result = []
 if isinstance(layer, (MLP, CompositeLayer)):
  for sub_layer in layer.layers:
   _get_conv_layers(sub_layer, result)
 elif isinstance(layer, (MaxoutConvC01B, ConvElemwise)):
  result.append(layer)
 return result

def _get_conv_layers ( layer , result = None ) : if ( result is None ) : result = [ ] if isinstance ( layer , ( MLP , CompositeLayer ) ) : for sub_layer in layer . layers : _get_conv_layers ( sub_layer , result ) elif isinstance ( layer , ( MaxoutConvC01B , ConvElemwise ) ) : result . append ( layer ) return result
returns a list of the convolutional layers in a model .