def __init__(self, is_training, add_summaries, num_classes, feature_extractor, image_resizer_fn, object_center_params, object_detection_params=None, keypoint_params_dict=None, mask_params=None, densepose_params=None, track_params=None, temporal_offset_params=None):
    'Initializes a CenterNet model.\n\n    Args:\n      is_training: Set to True if this model is being built for training.\n      add_summaries: Whether to add tf summaries in the model.\n      num_classes: int, The number of classes that the model should predict.\n      feature_extractor: A CenterNetFeatureExtractor to use to extract features\n        from an image.\n      image_resizer_fn: a callable for image resizing.  This callable always\n        takes a rank-3 image tensor (corresponding to a single image) and\n        returns a rank-3 image tensor, possibly with new spatial dimensions and\n        a 1-D tensor of shape [3] indicating shape of true image within the\n        resized image tensor as the resized image tensor could be padded. See\n        builders/image_resizer_builder.py.\n      object_center_params: An ObjectCenterParams namedtuple. This object holds\n        the hyper-parameters for object center prediction. This is required by\n        either object detection or keypoint estimation tasks.\n      object_detection_params: An ObjectDetectionParams namedtuple. This object\n        holds the hyper-parameters necessary for object detection. Please see\n        the class definition for more details.\n      keypoint_params_dict: A dictionary that maps from task name to the\n        corresponding KeypointEstimationParams namedtuple. This object holds the\n        hyper-parameters necessary for multiple keypoint estimations. Please\n        see the class definition for more details.\n      mask_params: A MaskParams namedtuple. This object\n        holds the hyper-parameters for segmentation. Please see the class\n        definition for more details.\n      densepose_params: A DensePoseParams namedtuple. This object holds the\n        hyper-parameters for DensePose prediction. Please see the class\n        definition for more details. Note that if this is provided, it is\n        expected that `mask_params` is also provided.\n      track_params: A TrackParams namedtuple. This object\n        holds the hyper-parameters for tracking. Please see the class\n        definition for more details.\n      temporal_offset_params: A TemporalOffsetParams namedtuple. This object\n        holds the hyper-parameters for offset prediction based tracking.\n    '
    assert (object_detection_params or keypoint_params_dict)
    self._is_training = is_training
    self._feature_extractor = feature_extractor
    self._num_feature_outputs = feature_extractor.num_feature_outputs
    self._stride = self._feature_extractor.out_stride
    self._image_resizer_fn = image_resizer_fn
    self._center_params = object_center_params
    self._od_params = object_detection_params
    self._kp_params_dict = keypoint_params_dict
    self._mask_params = mask_params
    if ((densepose_params is not None) and (mask_params is None)):
        raise ValueError('To run DensePose prediction, `mask_params` must also be supplied.')
    self._densepose_params = densepose_params
    self._track_params = track_params
    self._temporal_offset_params = temporal_offset_params
    self._prediction_head_dict = self._construct_prediction_heads(num_classes, self._num_feature_outputs, class_prediction_bias_init=self._center_params.heatmap_bias_init)
    self._target_assigner_dict = self._initialize_target_assigners(stride=self._stride, min_box_overlap_iou=self._center_params.min_box_overlap_iou)
    self._batched_prediction_tensor_names = []
    super(CenterNetMetaArch, self).__init__(num_classes)
Initializes a CenterNet model.

Args:
  is_training: Set to True if this model is being built for training.
  add_summaries: Whether to add tf summaries in the model.
  num_classes: int, The number of classes that the model should predict.
  feature_extractor: A CenterNetFeatureExtractor to use to extract features
    from an image.
  image_resizer_fn: a callable for image resizing.  This callable always
    takes a rank-3 image tensor (corresponding to a single image) and
    returns a rank-3 image tensor, possibly with new spatial dimensions and
    a 1-D tensor of shape [3] indicating shape of true image within the
    resized image tensor as the resized image tensor could be padded. See
    builders/image_resizer_builder.py.
  object_center_params: An ObjectCenterParams namedtuple. This object holds
    the hyper-parameters for object center prediction. This is required by
    either object detection or keypoint estimation tasks.
  object_detection_params: An ObjectDetectionParams namedtuple. This object
    holds the hyper-parameters necessary for object detection. Please see
    the class definition for more details.
  keypoint_params_dict: A dictionary that maps from task name to the
    corresponding KeypointEstimationParams namedtuple. This object holds the
    hyper-parameters necessary for multiple keypoint estimations. Please
    see the class definition for more details.
  mask_params: A MaskParams namedtuple. This object
    holds the hyper-parameters for segmentation. Please see the class
    definition for more details.
  densepose_params: A DensePoseParams namedtuple. This object holds the
    hyper-parameters for DensePose prediction. Please see the class
    definition for more details. Note that if this is provided, it is
    expected that `mask_params` is also provided.
  track_params: A TrackParams namedtuple. This object
    holds the hyper-parameters for tracking. Please see the class
    definition for more details.
  temporal_offset_params: A TemporalOffsetParams namedtuple. This object
    holds the hyper-parameters for offset prediction based tracking.
def __init__(self, is_training, add_summaries, num_classes, feature_extractor, image_resizer_fn, object_center_params, object_detection_params=None, keypoint_params_dict=None, mask_params=None, densepose_params=None, track_params=None, temporal_offset_params=None):
    'Initializes a CenterNet model.\n\n    Args:\n      is_training: Set to True if this model is being built for training.\n      add_summaries: Whether to add tf summaries in the model.\n      num_classes: int, The number of classes that the model should predict.\n      feature_extractor: A CenterNetFeatureExtractor to use to extract features\n        from an image.\n      image_resizer_fn: a callable for image resizing.  This callable always\n        takes a rank-3 image tensor (corresponding to a single image) and\n        returns a rank-3 image tensor, possibly with new spatial dimensions and\n        a 1-D tensor of shape [3] indicating shape of true image within the\n        resized image tensor as the resized image tensor could be padded. See\n        builders/image_resizer_builder.py.\n      object_center_params: An ObjectCenterParams namedtuple. This object holds\n        the hyper-parameters for object center prediction. This is required by\n        either object detection or keypoint estimation tasks.\n      object_detection_params: An ObjectDetectionParams namedtuple. This object\n        holds the hyper-parameters necessary for object detection. Please see\n        the class definition for more details.\n      keypoint_params_dict: A dictionary that maps from task name to the\n        corresponding KeypointEstimationParams namedtuple. This object holds the\n        hyper-parameters necessary for multiple keypoint estimations. Please\n        see the class definition for more details.\n      mask_params: A MaskParams namedtuple. This object\n        holds the hyper-parameters for segmentation. Please see the class\n        definition for more details.\n      densepose_params: A DensePoseParams namedtuple. This object holds the\n        hyper-parameters for DensePose prediction. Please see the class\n        definition for more details. Note that if this is provided, it is\n        expected that `mask_params` is also provided.\n      track_params: A TrackParams namedtuple. This object\n        holds the hyper-parameters for tracking. Please see the class\n        definition for more details.\n      temporal_offset_params: A TemporalOffsetParams namedtuple. This object\n        holds the hyper-parameters for offset prediction based tracking.\n    '
    assert (object_detection_params or keypoint_params_dict)
    self._is_training = is_training
    self._feature_extractor = feature_extractor
    self._num_feature_outputs = feature_extractor.num_feature_outputs
    self._stride = self._feature_extractor.out_stride
    self._image_resizer_fn = image_resizer_fn
    self._center_params = object_center_params
    self._od_params = object_detection_params
    self._kp_params_dict = keypoint_params_dict
    self._mask_params = mask_params
    if ((densepose_params is not None) and (mask_params is None)):
        raise ValueError('To run DensePose prediction, `mask_params` must also be supplied.')
    self._densepose_params = densepose_params
    self._track_params = track_params
    self._temporal_offset_params = temporal_offset_params
    self._prediction_head_dict = self._construct_prediction_heads(num_classes, self._num_feature_outputs, class_prediction_bias_init=self._center_params.heatmap_bias_init)
    self._target_assigner_dict = self._initialize_target_assigners(stride=self._stride, min_box_overlap_iou=self._center_params.min_box_overlap_iou)
    self._batched_prediction_tensor_names = []
    super(CenterNetMetaArch, self).__init__(num_classes)