def _compute_object_detection_losses(self, input_height, input_width, prediction_dict, per_pixel_weights):
    'Computes the weighted object detection losses.\n\n    This wrapper function calls the function which computes the losses for\n    object detection task and applies corresponding weights to the losses.\n\n    Args:\n      input_height: An integer scalar tensor representing input image height.\n      input_width: An integer scalar tensor representing input image width.\n      prediction_dict: A dictionary holding predicted tensors output by\n        "predict" function. See "predict" function for more detailed\n        description.\n      per_pixel_weights: A float tensor of shape [batch_size,\n        out_height * out_width, 1] with 1s in locations where the spatial\n        coordinates fall within the height and width in true_image_shapes.\n\n    Returns:\n      A dictionary of scalar float tensors representing the weighted losses for\n      object detection task:\n         BOX_SCALE: the weighted scale (height/width) loss.\n         BOX_OFFSET: the weighted object offset loss.\n    '
    (od_scale_loss, od_offset_loss) = self._compute_box_scale_and_offset_loss(scale_predictions=prediction_dict[BOX_SCALE], offset_predictions=prediction_dict[BOX_OFFSET], input_height=input_height, input_width=input_width)
    loss_dict = {}
    loss_dict[BOX_SCALE] = (self._od_params.scale_loss_weight * od_scale_loss)
    loss_dict[BOX_OFFSET] = (self._od_params.offset_loss_weight * od_offset_loss)
    return loss_dict
Computes the weighted object detection losses.

This wrapper function calls the function which computes the losses for
object detection task and applies corresponding weights to the losses.

Args:
  input_height: An integer scalar tensor representing input image height.
  input_width: An integer scalar tensor representing input image width.
  prediction_dict: A dictionary holding predicted tensors output by
    "predict" function. See "predict" function for more detailed
    description.
  per_pixel_weights: A float tensor of shape [batch_size,
    out_height * out_width, 1] with 1s in locations where the spatial
    coordinates fall within the height and width in true_image_shapes.

Returns:
  A dictionary of scalar float tensors representing the weighted losses for
  object detection task:
     BOX_SCALE: the weighted scale (height/width) loss.
     BOX_OFFSET: the weighted object offset loss.
def _compute_object_detection_losses(self, input_height, input_width, prediction_dict, per_pixel_weights):
    'Computes the weighted object detection losses.\n\n    This wrapper function calls the function which computes the losses for\n    object detection task and applies corresponding weights to the losses.\n\n    Args:\n      input_height: An integer scalar tensor representing input image height.\n      input_width: An integer scalar tensor representing input image width.\n      prediction_dict: A dictionary holding predicted tensors output by\n        "predict" function. See "predict" function for more detailed\n        description.\n      per_pixel_weights: A float tensor of shape [batch_size,\n        out_height * out_width, 1] with 1s in locations where the spatial\n        coordinates fall within the height and width in true_image_shapes.\n\n    Returns:\n      A dictionary of scalar float tensors representing the weighted losses for\n      object detection task:\n         BOX_SCALE: the weighted scale (height/width) loss.\n         BOX_OFFSET: the weighted object offset loss.\n    '
    (od_scale_loss, od_offset_loss) = self._compute_box_scale_and_offset_loss(scale_predictions=prediction_dict[BOX_SCALE], offset_predictions=prediction_dict[BOX_OFFSET], input_height=input_height, input_width=input_width)
    loss_dict = {}
    loss_dict[BOX_SCALE] = (self._od_params.scale_loss_weight * od_scale_loss)
    loss_dict[BOX_OFFSET] = (self._od_params.offset_loss_weight * od_offset_loss)
    return loss_dict