code: def _reset_parameters(self):
      # sampling_offsets
      constant_(self.sampling_offsets.weight)
      thetas = paddle.arange(self.num_heads, dtype=paddle.float32) * (
          2.0 * math.pi / self.num_heads
      )
      grid_init = paddle.stack([thetas.cos(), thetas.sin()], -1)
      grid_init = grid_init / grid_init.abs().max(-1, keepdim=True)
      grid_init = grid_init.reshape([self.num_heads, 1, 1, 2]).tile(
          [1, self.num_levels, self.num_points, 1]
      )
      scaling = paddle.arange(
          1, self.num_points + 1, dtype=paddle.float32
      ).reshape([1, 1, -1, 1])
      grid_init *= scaling
      self.sampling_offsets.bias.set_value(grid_init.flatten())
      # attention_weights
      constant_(self.attention_weights.weight)
      constant_(self.attention_weights.bias)
      # proj
      xavier_uniform_(self.value_proj.weight)
      constant_(self.value_proj.bias)
      xavier_uniform_(self.output_proj.weight)
      constant_(self.output_proj.bias)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from ppdet.core.workspace import register
  from ..layers import MultiHeadAttention
  from .position_encoding import PositionEmbedding
  from .utils import _get_clones, get_valid_ratio
  from ..initializer import linear_init_, constant_, xavier_uniform_, normal_
label_desc: Use image node_id 2 for calling the MSDeformableAttention obj's underlying member method code with example usage: obj._reset_parameters() without return types