def _compute_segmentation_losses(self, prediction_dict, per_pixel_weights):
    'Computes all the losses associated with segmentation.\n\n    Args:\n      prediction_dict: The dictionary returned from the predict() method.\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 with segmentation losses.\n    '
    segmentation_heatmap = prediction_dict[SEGMENTATION_HEATMAP]
    mask_loss = self._compute_mask_loss(segmentation_heatmap, per_pixel_weights)
    losses = {SEGMENTATION_HEATMAP: mask_loss}
    return losses
Computes all the losses associated with segmentation.

Args:
  prediction_dict: The dictionary returned from the predict() method.
  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 with segmentation losses.
def _compute_segmentation_losses(self, prediction_dict, per_pixel_weights):
    'Computes all the losses associated with segmentation.\n\n    Args:\n      prediction_dict: The dictionary returned from the predict() method.\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 with segmentation losses.\n    '
    segmentation_heatmap = prediction_dict[SEGMENTATION_HEATMAP]
    mask_loss = self._compute_mask_loss(segmentation_heatmap, per_pixel_weights)
    losses = {SEGMENTATION_HEATMAP: mask_loss}
    return losses