Ejemplo n.º 1
0
def classification_head_generator(params):
  """Generator function for classification head architecture."""
  return heads.ClassificationHead(
      params.num_classes,
      params.endpoints_num_filters,
      params.aggregation,
      params.dropout_rate,
      batch_norm_relu=batch_norm_relu_generator(params.batch_norm))
Ejemplo n.º 2
0
def classification_head_generator(params):
  """Generator function for classification head architecture."""
  head_params = params.classification_head
  return heads.ClassificationHead(
      params.architecture.num_classes,
      head_params.endpoints_num_filters,
      head_params.aggregation,
      head_params.dropout_rate,
      batch_norm_activation=batch_norm_activation_generator(
          params.batch_norm_activation))