def test_grad_zca_individual_transforms(self, device):
        """Check if the gradients of the transforms are correct w.r.t to the input data."""
        data = torch.tensor([[2, 0], [0, 1], [-2, 0], [0, -1]], device=device, dtype=torch.float64)

        def zca_T(x):
            return kornia.enhance.zca_mean(x)[0]

        def zca_mu(x):
            return kornia.enhance.zca_mean(x)[1]

        def zca_T_inv(x):
            return kornia.enhance.zca_mean(x, return_inverse=True)[2]

        self.gradcheck(zca_T, (data,))
        self.gradcheck(zca_mu, (data,))
        self.gradcheck(zca_T_inv, (data,))
Check if the gradients of the transforms are correct w.r.t to the input data.
tests/enhance/test_zca.py