def build_inv_delta_C_paddle(self, C):
        """ Return inv_delta_C which is needed to calculate T """
        F = self.F
        hat_C = torch.zeros((F, F), dtype=torch.float64)  # F x F
        for i in range(0, F):
            for j in range(i, F):
                if i == j:
                    hat_C[i, j] = 1
                else:
                    r = torch.norm(C[i] - C[j])
                    hat_C[i, j] = r
                    hat_C[j, i] = r
        hat_C = (hat_C**2) * torch.log(hat_C)
        delta_C = torch.cat(  # F+3 x F+3
            [
                torch.cat(
                    [torch.ones(
                        (F, 1), dtype=torch.float64), C, hat_C], dim=1),  # F x F+3
                torch.cat(
                    [
                        torch.zeros(
                            (2, 3), dtype=torch.float64), C.permute(1,0)
                    ],
                    dim=1),  # 2 x F+3
                torch.cat(
                    [
                        torch.zeros(
                            (1, 3), dtype=torch.float64), torch.ones(
                                (1, F), dtype=torch.float64)
                    ],
                    dim=1)  # 1 x F+3
            ],
            dim=0)
        inv_delta_C = torch.inverse(delta_C)
        return inv_delta_C  # F+3 x F+3
 Return inv_delta_C which is needed to calculate T 
pytorchocr/modeling/transforms/tps.py