docstr: CrossEntropy Loss from gcn module.
  
  Args:
      gcn_data (tuple(Tensor, Tensor)): The first is the
          prediction with shape :math:`(N, 2)` and the
          second is the gt label with shape :math:`(m, n)`
          where :math:`m * n = N`.
  
  Returns:
      Tensor: CrossEntropy loss.
docstr_tok: ["CrossEntropy","Loss","from","gcn","module",".","Args",":","gcn_data","(","tuple","(","Tensor",",","Tensor",")",")",":","The","first","is","the","prediction","with","shape",":","math",":","`","(","N",",","2",")","`","and","the","second","is","the","gt","label","with","shape",":","math",":","`","(","m",",","n",")","`","where",":","math",":","`","m","*","n","=","N","`",".","Returns",":","Tensor",":","CrossEntropy","loss","."]
code: def gcn_loss(self, gcn_data):
      """CrossEntropy Loss from gcn module.
  
      Args:
          gcn_data (tuple(Tensor, Tensor)): The first is the
              prediction with shape :math:`(N, 2)` and the
              second is the gt label with shape :math:`(m, n)`
              where :math:`m * n = N`.
  
      Returns:
          Tensor: CrossEntropy loss.
      """
      gcn_pred, gt_labels = gcn_data
      gt_labels = gt_labels.reshape([-1])
      loss = F.cross_entropy(gcn_pred, gt_labels)
  
      return loss
  
file_path: PaddleOCR/ppocr/losses/det_drrg_loss.py
imports: import paddle
  import paddle.nn.functional
  from paddle import nn
label_desc: Use image node_id 3 for calling the DRRGLoss obj's underlying member method code with example usage: obj.gcn_loss(gcn_data) and returns: loss