def pool_prior_features(self, batch_features, num_priors, prior_xs):
        """
        pool prior feature from feature map.
        Args:
            batch_features (Tensor): Input feature maps, shape: (B, C, H, W) 
        """
        batch_size = batch_features.shape[0]
        prior_xs = prior_xs.reshape([batch_size, num_priors, -1, 1])

        prior_ys = self.prior_feat_ys.tile(repeat_times=[
            batch_size * num_priors
        ]).reshape([batch_size, num_priors, -1, 1])
        prior_xs = prior_xs * 2.0 - 1.0
        prior_ys = prior_ys * 2.0 - 1.0
        grid = paddle.concat(x=(prior_xs, prior_ys), axis=-1)
        feature = F.grid_sample(
            x=batch_features, grid=grid,
            align_corners=True).transpose(perm=[0, 2, 1, 3])
        feature = feature.reshape([
            batch_size * num_priors, self.prior_feat_channels,
            self.sample_points, 1
        ])
        return feature

        pool prior feature from feature map.
        Args:
            batch_features (Tensor): Input feature maps, shape: (B, C, H, W) 
        
ppdet/modeling/heads/clrnet_head.py