code: def init_stn(self):
      margin = 0.01
      sampling_num_per_side = int(self.num_ctrlpoints / 2)
      ctrl_pts_x = np.linspace(
          margin, 1.0 - margin, sampling_num_per_side
      )
      ctrl_pts_y_top = np.ones(sampling_num_per_side) * margin
      ctrl_pts_y_bottom = np.ones(sampling_num_per_side) * (1 - margin)
      ctrl_pts_top = np.stack([ctrl_pts_x, ctrl_pts_y_top], axis=1)
      ctrl_pts_bottom = np.stack(
          [ctrl_pts_x, ctrl_pts_y_bottom], axis=1
      )
      ctrl_points = np.concatenate(
          [ctrl_pts_top, ctrl_pts_bottom], axis=0
      ).astype(np.float32)
      if self.activation == "none":
          pass
      elif self.activation == "sigmoid":
          ctrl_points = -np.log(1.0 / ctrl_points - 1.0)
      ctrl_points = paddle.to_tensor(ctrl_points)
      fc2_bias = paddle.reshape(
          ctrl_points,
          shape=[ctrl_points.shape[0] * ctrl_points.shape[1]],
      )
      return fc2_bias
  
file_path: PaddleOCR/ppocr/modeling/transforms/stn.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
  from paddle.nn import functional
  import numpy
  from .tps_spatial_transformer import TPSSpatialTransformer
label_desc: Use image node_id 2 for calling the STN obj's underlying member method code with example usage: obj.init_stn() and returns: fc2_bias