code: def forward(self, x):
      x_in = x
      x_out = x
  
      b, c, _, _ = x_in.shape
      y = self.avg_pool(x_in)
      y = paddle.reshape(y, [b, c])
      y = self.fc(y)
      y = paddle.reshape(y, [b, self.oup * self.exp, 1, 1])
      y = (y - 0.5) * self.act_max
  
      n2, c2, h2, w2 = x_out.shape
      x2 = paddle.to_tensor(x_out.numpy()[:, self.index.numpy(), :, :])
  
      if self.exp == 4:
          temp = y.shape
          a1, b1, a2, b2 = paddle.split(y, temp[1] // self.oup, axis=1)
  
          a1 = a1 + self.init_a[0]
          a2 = a2 + self.init_a[1]
  
          b1 = b1 + self.init_b[0]
          b2 = b2 + self.init_b[1]
  
          z1 = x_out * a1 + x2 * b1
          z2 = x_out * a2 + x2 * b2
  
          out = paddle.maximum(z1, z2)
  
      elif self.exp == 2:
          temp = y.shape
          a1, b1 = paddle.split(y, temp[1] // self.oup, axis=1)
          a1 = a1 + self.init_a[0]
          b1 = b1 + self.init_b[0]
          out = x_out * a1 + x2 * b1
  
      return out
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  from ppocr.modeling.backbones.det_mobilenet_v3 import make_divisible
label_desc: Use image node_id 2 for calling the DYShiftMax obj's underlying member method code with example usage: obj.forward(x) and returns: out