Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AssertionError #26

Open
leedrake5 opened this issue May 16, 2024 · 1 comment
Open

AssertionError #26

leedrake5 opened this issue May 16, 2024 · 1 comment

Comments

@leedrake5
Copy link

I am pretty sure this is really just a dimensionally issue, but trying to use KANLinear to substitute for nn.Linear to try this approach out. I can use the tutorial to get it to work with MNIST just fine, but it doesn't work well outside the box, almost certainly because I am missing something.

I keep getting the error for forward:

assert x.dim() == 2 and x.size(1) == self.in_features
AssertationError

All I am doing is dropping KANLinear in for nn.Linear, and keeping in_features and out_features the same hidden size. Is there a way forward can be edited to allow non-image inputs?

@Blealtan
Copy link
Owner

My fault. I assumed the layer should accept 2d inputs, which is not the case for nn.Linear. The outer dimensions should be simply view as flattened. Will fix soon.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants