(name, num_classes, weight_decay=0.0, is_training=False, width_multiplier=1)
return network_fn
Returns a network_fn such as `logits, end_points = network_fn(images)`.

  Args:
    name: The name of the network.
    num_classes: The number of classes to use for classification.
    weight_decay: The l2 coefficient for the model weights.
    is_training: `True` if the model is being used for training and `False`
      otherwise.

  Returns:
    network_fn: A function that applies the model to a batch of images. It has
      the following signature:
        logits, end_points = network_fn(images)
  Raises:
    ValueError: If network `name` is not recognized.
Returns a network_fn such as `logits, end_points = network_fn(images)`.
Returns a network_fn such as logits end_points = network_fn ( images ) .
def get_network_fn(name, num_classes, weight_decay=0.0, is_training=False, width_multiplier=1):
  """Returns a network_fn such as `logits, end_points = network_fn(images)`.

  Args:
    name: The name of the network.
    num_classes: The number of classes to use for classification.
    weight_decay: The l2 coefficient for the model weights.
    is_training: `True` if the model is being used for training and `False`
      otherwise.

  Returns:
    network_fn: A function that applies the model to a batch of images. It has
      the following signature:
        logits, end_points = network_fn(images)
  Raises:
    ValueError: If network `name` is not recognized.
  """
  if name not in networks_map:
    raise ValueError('Name of network unknown %s' % name)
  func = networks_map[name]
  @functools.wraps(func)
  def network_fn(images):
    arg_scope = arg_scopes_map[name](weight_decay=weight_decay)
    with slim.arg_scope(arg_scope):
      if name=='mobilenet':
        return func(images, num_classes, is_training=is_training, width_multiplier=width_multiplier)
      elif name=='mobilenetdet':
        return func(images, is_training=is_training, width_multiplier=width_multiplier)
      else:
        return func(images, num_classes, is_training=is_training)
  if hasattr(func, 'default_image_size'):
    network_fn.default_image_size = func.default_image_size

  return network_fn
def get_network_fn ( name , num_classes , weight_decay = 0.0 , is_training = False , width_multiplier = 1 ) : if name not in networks_map : raise ValueError ( 'Name of network unknown %s' % name ) func = networks_map [ name ] @ functools . wraps ( func ) def network_fn ( images ) : arg_scope = arg_scopes_map [ name ] ( weight_decay = weight_decay ) with slim . arg_scope ( arg_scope ) : if name == 'mobilenet' : return func ( images , num_classes , is_training = is_training , width_multiplier = width_multiplier ) elif name == 'mobilenetdet' : return func ( images , is_training = is_training , width_multiplier = width_multiplier ) else : return func ( images , num_classes , is_training = is_training ) if hasattr ( func , 'default_image_size' ) : network_fn . default_image_size = func . default_image_size return network_fn