pykan icon indicating copy to clipboard operation
pykan copied to clipboard

Tensor size mismatch due to scaling

Open alabaykazakh opened this issue 7 months ago • 3 comments

Train data shape: torch.Size([20000, 2]) Train target shape: torch.Size([20000, 648]) Test data shape: torch.Size([100, 2]) Test target shape: torch.Size([100, 648])

I am trying to solve a regression problem, specifically map (, 2) input to (,648) output, and ultimately compare the performance with MLP. Let's say, my KAN size for this specific problem is: model = KAN(width=[2,20,20,648], grid=10, k=3, seed=0, device=device)

However, I face a problem with tensor size: "RuntimeError: The size of tensor a (20) must match the size of tensor b (40) at non-singleton dimension 1" I guess the issue is related to the scaling while passing the tensor between KANLayers. Did anyone face such an issue?

alabaykazakh avatar Jul 09 '24 09:07 alabaykazakh