parameters: (base_model, pooling_method='avg')
return_statement: return model
docstring: Creates a features extractor based on the provided base network.
      
      Parameters
      ----------
      base_model : keras.Model
          Base network for feature extraction
      pooling_method : str, optional
          Pooling method that will be used as the last layer, by default 'avg'
      
      Returns
      -------
      keras.Model
          Ready to use feature extractor
docstring_summary: Creates a features extractor based on the provided base network.
      
      Parameters
      ----------
      base_model : keras.Model
          Base network for feature extraction
      pooling_method : str, optional
          Pooling method that will be used as the last layer, by default 'avg'
      
      Returns
      -------
      keras.Model
          Ready to use feature extractor
docstring_tokens: Creates a features extractor based on the provided base network . Parameters ---------- base_model : keras . Model Base network for feature extraction pooling_method : str optional Pooling method that will be used as the last layer by default avg Returns ------- keras . Model Ready to use feature extractor
function: def create_feat_extractor(base_model, pooling_method='avg'):
      """Creates a features extractor based on the provided base network.
      
      Parameters
      ----------
      base_model : keras.Model
          Base network for feature extraction
      pooling_method : str, optional
          Pooling method that will be used as the last layer, by default 'avg'
      
      Returns
      -------
      keras.Model
          Ready to use feature extractor
      """
      assert pooling_method in ['avg', 'max']
      
      x = base_model.output
      if pooling_method=='avg':
          x = GlobalAveragePooling2D()(x)
      elif pooling_method=='max':
          x = GlobalMaxPooling2D()(x)
      model = Model(input=base_model.input, output=[x])
  
      return model
function_tokens: def create_feat_extractor ( base_model , pooling_method = 'avg' ) : assert pooling_method in [ 'avg' , 'max' ] x = base_model . output if pooling_method == 'avg' : x = GlobalAveragePooling2D ( ) ( x ) elif pooling_method == 'max' : x = GlobalMaxPooling2D ( ) ( x ) model = Model ( input = base_model . input , output = [ x ] ) return model