def METHOD_NAME(self):
    constant_init(self.sampling_offsets.weight, value=0.)
    thetas = paddle.arange(
        self.n_heads, dtype='float32') * (2.0 * math.pi / self.n_heads)
    grid_init = paddle.stack([thetas.cos(), thetas.sin()], -1)
    grid_init = (grid_init / grid_init.abs().max(
        -1, keepdim=True)[0]).reshape([self.n_heads, 1, 1, 2]).tile(
            [1, self.n_levels, self.n_points, 1])
    for i in range(self.n_points):
        grid_init[:, :, i, :] *= i + 1
    grid_init = grid_init.reshape([-1])
    self.sampling_offsets.bias = self.create_parameter(
        shape=grid_init.shape,
        default_initializer=paddle.nn.initializer.Assign(grid_init))
    self.sampling_offsets.bias.stop_gradient = True
    constant_init(self.attention_weights.weight, value=0.)
    constant_init(self.attention_weights.bias, value=0.)
    xavier_uniform(self.value_proj.weight)
    constant_init(self.value_proj.bias, value=0.)
    xavier_uniform(self.output_proj.weight)
    constant_init(self.output_proj.bias, value=0.)