def METHOD_NAME(self, theta_x, phi_x):
    h = theta_x.shape[2]
    w = phi_x.shape[3]
    theta_x = paddle.tile(theta_x, [1, 1, 1, w])
    phi_x = paddle.tile(phi_x, [1, 1, h, 1])
    concat_feature = paddle.concat([theta_x, phi_x], axis=1)
    pairwise_weight = self.concat_project(concat_feature)
    n, _, h, w = pairwise_weight.shape
    pairwise_weight = paddle.reshape(pairwise_weight, [n, h, w])
    pairwise_weight /= pairwise_weight.shape[-1]
    return pairwise_weight