parameters: (base_model, nb_classes)
return_statement: return model
docstring: Add last layer to the convnet
          Args:
              base_model: keras model excluding top
              nb_classes: # of classes
          Returns:
              new keras model with last layer
docstring_summary: Add last layer to the convnet
          Args:
              base_model: keras model excluding top
              nb_classes: # of classes
          Returns:
              new keras model with last layer
docstring_tokens: Add last layer to the convnet Args : base_model : keras model excluding top nb_classes : # of classes Returns : new keras model with last layer
function: def setup_new_classifier(base_model, nb_classes):
      """Add last layer to the convnet
          Args:
              base_model: keras model excluding top
              nb_classes: # of classes
          Returns:
              new keras model with last layer
      """
      FC_SIZE = 1024
      
      x = base_model.output
      x = GlobalAveragePooling2D()(x)
      x = Dense(FC_SIZE, activation='relu')(x) #new FC layer, random init
      predictions = Dense(nb_classes, activation='softmax')(x) #new softmax layer
      model = Model(inputs=base_model.input, outputs=predictions)
      return model
function_tokens: def setup_new_classifier ( base_model , nb_classes ) : FC_SIZE = 1024 x = base_model . output x = GlobalAveragePooling2D ( ) ( x ) x = Dense ( FC_SIZE , activation = 'relu' ) ( x ) #new FC layer, random init predictions = Dense ( nb_classes , activation = 'softmax' ) ( x ) #new softmax layer model = Model ( inputs = base_model . input , outputs = predictions ) return model