Hi,
I’m trying to implement Gaussian Process with pytorch, and faced some wierd behavior in using torch.matmul function which wonderd me whether i’m using it in correct way!
k1 = tensor([[1.0000, 1.0000, 0.9998],
[1.0000, 1.0000, 1.0000],
[0.9998, 1.0000, 1.0000]], dtype=torch.float64)
k2 = tensor([[1.0000, 1.0000, 0.9998, 0.9968],
[1.0000, 1.0000, 1.0000, 0.9976],
[0.9998, 1.0000, 1.0000, 0.9982]], dtype=torch.float64)
alphas = tensor([[-12851.3568],
[ 28321.3013],
[-15470.6538]], dtype=torch.float64)
now comes the wierd result, the first third elemets of y2 should be the same like the y1 but they are totally different!
y1 = torch.matmul(k1.T, alphas) = tensor([[0.8400],
[0.9900],
[0.2900]], dtype=torch.float64)
y2 = torch.matmul(k2.T, alphas) = tensor([[ 0.9685],
[ 0.7068],
[ 0.4447],
[-1.1308]], dtype=torch.float64)
What did I do here wrong?!
thanks in advance for your tips