code: def __init__(self, beta=1.0, loss_weight=1.0):
      super(SmoothL1Loss, self).__init__()
      self.beta = beta
      self.loss_weight = loss_weight
  
      np_coord = np.zeros(shape=[640, 640, 2], dtype=np.int64)
      for i in range(640):
          for j in range(640):
              np_coord[i, j, 0] = j
              np_coord[i, j, 1] = i
      np_coord = np_coord.reshape((-1, 2))
  
      self.coord = self.create_parameter(
          shape=[640 * 640, 2],
          dtype="int32",  # NOTE: not support "int64" before paddle 2.3.1
          default_initializer=nn.initializer.Assign(value=np_coord),
      )
      self.coord.stop_gradient = True
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import nn
  import paddle.nn.functional
  import numpy
label_desc: Use image node_id 1 to create a new SmoothL1Loss object from inherited base classes: nn with example: obj = SmoothL1Loss(beta, loss_weight)