def METHOD_NAME(self, img_feat, img_ps):
    img_ps = img_ps[0]  # squeeze dim 0
    # convolve the feature to get correlation (similarity) map
    img_ps_normed = img_ps / paddle.clip(self.l2_norm(img_ps), 1e-4)
    img_feat = F.pad(img_feat, (1, 1, 1, 1), mode='reflect')
    similarity_map = F.conv2d(img_feat, img_ps_normed)
    return similarity_map