Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

problem of auto_symbolic(lib=lib) #480

Open
niuniu666-ignore opened this issue Oct 11, 2024 · 0 comments
Open

problem of auto_symbolic(lib=lib) #480

niuniu666-ignore opened this issue Oct 11, 2024 · 0 comments

Comments

@niuniu666-ignore
Copy link

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.

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

No branches or pull requests

1 participant