efficient-kan
efficient-kan copied to clipboard
RuntimeError: false INTERNAL ASSERT FAILED
Getting this error when running test_simple_math.py
. Any idea how to resolve it?
File "/home/chansingh/test/kan.py", line 131, in curve2coeff
solution = torch.linalg.lstsq(
^^^^^^^^^^^^^^^^^^^
RuntimeError: false INTERNAL ASSERT FAILED at "../aten/src/ATen/native/BatchLinearAlgebra.cpp":1539, please report a bug to PyTorch. torch.linalg.lstsq: (Batch element 0): Argument 6 has illegal value. Most certainly there is a bug in the implementation calling the backend library.
(pytorch is up-to-date, version '2.3.0+cu121', python 3.11)
Me, too. But the examples/mnist.py can work correctly.
Worked okay when I just lowered the learning rate / switched the optimizer...
That one happens somewhat randomly when reconstructing the splines on the new grid (performing update_grid
)... Possibly some numerical failure in the Least Square optimization. I also encountered that in some cases. To workaround that, consider pre-normalize input into [-1, 1]
, and avoid calling update_grid
.