class_docstr: Class orientation
  
  Args:
  
      params(dict): super parameters for build Class network
class_docstr_tok: ["Class","orientation","Args",":","params","(","dict",")",":","super","parameters","for","build","Class","network"]
code: def forward(self, x, targets=None):
      x = self.pool(x)
      x = paddle.reshape(x, shape=[x.shape[0], x.shape[1]])
      x = self.fc(x)
      if not self.training:
          x = F.softmax(x, axis=1)
      return x
  
file_path: PaddleOCR/ppocr/modeling/heads/cls_head.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  from paddle import nn, ParamAttr
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the ClsHead obj's underlying member method code with example usage: obj.forward(x, targets) and returns: x