class_docstr: ClsSoftmaxCost.
  
  Args:
      weight (int | float, optional): loss_weight
class_docstr_tok: ["ClsSoftmaxCost",".","Args",":","weight","(","int","|","float",",","optional",")",":","loss_weight"]
docstr: Args:
      cls_pred (Tensor): Predicted classification logits, shape
          (num_query, num_class).
      gt_labels (Tensor): Label of `gt_bboxes`, shape (num_gt,).
  
  Returns:
      paddle.Tensor: cls_cost value with weight
docstr_tok: ["Args",":","cls_pred","(","Tensor",")",":","Predicted","classification","logits",",","shape","(","num_query",",","num_class",")",".","gt_labels","(","Tensor",")",":","Label","of","`","gt_bboxes","`",",","shape","(","num_gt",",",")",".","Returns",":","paddle.Tensor",":","cls_cost","value","with","weight"]
code: def __call__(self, cls_pred, gt_labels):
      """
      Args:
          cls_pred (Tensor): Predicted classification logits, shape
              (num_query, num_class).
          gt_labels (Tensor): Label of `gt_bboxes`, shape (num_gt,).
  
      Returns:
          paddle.Tensor: cls_cost value with weight
      """
      # Following the official DETR repo, contrary to the loss that
      # NLL is used, we approximate it in 1 - cls_score[gt_label].
      # The 1 is a constant that doesn't change the matching,
      # so it can be omitted.
      cls_score = cls_pred.softmax(-1)
      cls_cost = -cls_score[:, gt_labels]
      return cls_cost * self.weight
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import paddle
  import paddle.nn.functional
  from ppdet.core.workspace import register
label_desc: Use image node_id 2 for calling the ClassificationCost obj's underlying member method code with example usage: obj.__call__(cls_pred, gt_labels) and returns: unknown