class_docstr: DensePose loss for chart-based training. A mesh is split into charts,
  each chart is given a label (I) and parametrized by 2 coordinates referred to
  as U and V. Ground truth consists of a number of points annotated with
  I, U and V values and coarse segmentation S defined for all pixels of the
  object bounding box. In some cases (see `COARSE_SEGM_TRAINED_BY_MASKS`),
  semantic segmentation annotations can be used as ground truth inputs as well.
  
  Estimated values are tensors:
   * U coordinates, tensor of shape [N, C, S, S]
   * V coordinates, tensor of shape [N, C, S, S]
   * fine segmentation estimates, tensor of shape [N, C, S, S] with raw unnormalized
     scores for each fine segmentation label at each location
   * coarse segmentation estimates, tensor of shape [N, D, S, S] with raw unnormalized
     scores for each coarse segmentation label at each location
  where N is the number of detections, C is the number of fine segmentation
  labels, S is the estimate size ( = width = height) and D is the number of
  coarse segmentation channels.
  
  The losses are:
  * regression (smooth L1) loss for U and V coordinates
  * cross entropy loss for fine (I) and coarse (S) segmentations
  Each loss has an associated weight
docstr: Fake losses for U/V coordinates. These are used when no suitable ground
  truth data was found in a batch. The loss has a value 0
  and is primarily used to construct the computation graph, so that
  `DistributedDataParallel` has similar graphs on all GPUs and can perform
  reduction properly.
  
  Args:
      densepose_predictor_outputs: DensePose predictor outputs, an object
          of a dataclass that is assumed to have the following attributes:
       * u - U coordinate estimates per fine labels, tensor of shape [N, C, S, S]
       * v - V coordinate estimates per fine labels, tensor of shape [N, C, S, S]
  Return:
      dict: str -> tensor: dict of losses with the following entries:
       * `loss_densepose_U`: has value 0
       * `loss_densepose_V`: has value 0
docstr_tok: ["Fake","losses","for","U\/V","coordinates",".","These","are","used","when","no","suitable","ground","truth","data","was","found","in","a","batch",".","The","loss","has","a","value","0","and","is","primarily","used","to","construct","the","computation","graph",",","so","that","`","DistributedDataParallel","`","has","similar","graphs","on","all","GPUs","and","can","perform","reduction","properly",".","Args",":","densepose_predictor_outputs",":","DensePose","predictor","outputs",",","an","object","of","a","dataclass","that","is","assumed","to","have","the","following","attributes",":","*","u","-","U","coordinate","estimates","per","fine","labels",",","tensor","of","shape","[","N",",","C",",","S",",","S","]","*","v","-","V","coordinate","estimates","per","fine","labels",",","tensor","of","shape","[","N",",","C",",","S",",","S","]","Return",":","dict",":","str","-",">","tensor",":","dict","of","losses","with","the","following","entries",":","*","`","loss_densepose_U","`",":","has","value","0","*","`","loss_densepose_V","`",":","has","value","0"]
code: def produce_fake_densepose_losses_uv(
      self, densepose_predictor_outputs: Any
  ) -> LossDict:
      """
      Fake losses for U/V coordinates. These are used when no suitable ground
      truth data was found in a batch. The loss has a value 0
      and is primarily used to construct the computation graph, so that
      `DistributedDataParallel` has similar graphs on all GPUs and can perform
      reduction properly.
  
      Args:
          densepose_predictor_outputs: DensePose predictor outputs, an object
              of a dataclass that is assumed to have the following attributes:
           * u - U coordinate estimates per fine labels, tensor of shape [N, C, S, S]
           * v - V coordinate estimates per fine labels, tensor of shape [N, C, S, S]
      Return:
          dict: str -> tensor: dict of losses with the following entries:
           * `loss_densepose_U`: has value 0
           * `loss_densepose_V`: has value 0
      """
      return {
          "loss_densepose_U": densepose_predictor_outputs.u.sum() * 0,
          "loss_densepose_V": densepose_predictor_outputs.v.sum() * 0,
      }
  
file_path: detectron2/projects/DensePose/densepose/modeling/losses/chart.py
imports: from typing import Any, List
  import torch
  from torch.nn import functional
  from detectron2.config import CfgNode
  from detectron2.structures import Instances
  from .mask_or_segm import MaskOrSegmentationLoss
  from .registry import DENSEPOSE_LOSS_REGISTRY
  from .utils import BilinearInterpolationHelper, ChartBasedAnnotationsAccumulator, LossDict, extract_packed_annotations_from_matches
label_desc: Use image node_id 4 for calling the DensePoseChartLoss obj's underlying member method code with example usage: obj.produce_fake_densepose_losses_uv(densepose_predictor_outputs) and returns: dict