class_docstr: Implements the cross entropy loss function.
  
  Args:
      min_K (int): the minimum number of pixels to be counted in loss computation.
      loss_th (float): the loss threshold. Only loss that is larger than the threshold
          would be calculated.
      weight (tuple|list, optional): The weight for different classes. Default: None.
      ignore_index (int, optional): Specifies a target value that is ignored
          and does not contribute to the input gradient. Default: 255.
code: def forward(self, logit, label):
      n, c, h, w = logit.shape
      total_loss = 0.0
      if len(label.shape) != len(logit.shape):
          label = paddle.unsqueeze(label, 1)
  
      for i in range(n):
          x = paddle.unsqueeze(logit[i], 0)
          y = paddle.unsqueeze(label[i], 0)
          x = paddle.transpose(x, (0, 2, 3, 1))
          y = paddle.transpose(y, (0, 2, 3, 1))
          x = paddle.reshape(x, shape=(-1, c))
          y = paddle.reshape(y, shape=(-1,))
          loss = F.cross_entropy(
              x,
              y,
              weight=self.weight,
              ignore_index=self.ignore_index,
              reduction="none",
          )
          sorted_loss = paddle.sort(loss, descending=True)
          if sorted_loss[self.K] > self.threshold:
              new_indices = paddle.nonzero(sorted_loss > self.threshold)
              loss = paddle.gather(sorted_loss, new_indices)
          else:
              loss = sorted_loss[: self.K]
  
          total_loss += paddle.mean(loss)
      return total_loss / float(n)
  
file_path: PaddleSeg/paddleseg/models/losses/bootstrapped_cross_entropy.py
imports: import paddle
  from paddle import nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
label_desc: Use image node_id 2 for calling the BootstrappedCrossEntropyLoss obj's underlying member method code with example usage: obj.forward(logit, label) and returns: unknown