You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use model.prune() to prune my KAN network. After that, I use model.auto_symbolic(lib=lib) to get a formula.
The problem is that when I use lib = ['x'] to get a linear formula, KAN is work. However, when I change the lib = ['x'] to lib = ['x', 'x^2', 'x^3', 'x^4', 'exp', 'log', 'sqrt', 'tanh', 'sin', 'abs', 'cosh'], the system reports an error: ZeroDivisionError: integer division or modulo by zero. Sometimes, when I change the initial seed, KAN will work and give me a complex formula. For example, I change KAN(width=[4, 4, 4, 1], grid = 20, k=3, seed=0) to KAN(width=[4, 4, 4, 1], grid = 20, k=3, seed=100), the code will run successful, but sometimes, whatever I change the initial seed, the system will always report the error, which I mentioned before.
I cannot sovle this problem.
The text was updated successfully, but these errors were encountered:
I use model.prune() to prune my KAN network. After that, I use model.auto_symbolic(lib=lib) to get a formula.
The problem is that when I use lib = ['x'] to get a linear formula, KAN is work. However, when I change the lib = ['x'] to lib = ['x', 'x^2', 'x^3', 'x^4', 'exp', 'log', 'sqrt', 'tanh', 'sin', 'abs', 'cosh'], the system reports an error: ZeroDivisionError: integer division or modulo by zero. Sometimes, when I change the initial seed, KAN will work and give me a complex formula. For example, I change KAN(width=[4, 4, 4, 1], grid = 20, k=3, seed=0) to KAN(width=[4, 4, 4, 1], grid = 20, k=3, seed=100), the code will run successful, but sometimes, whatever I change the initial seed, the system will always report the error, which I mentioned before.
I cannot sovle this problem.
The text was updated successfully, but these errors were encountered: