pykan icon indicating copy to clipboard operation
pykan copied to clipboard

symbolic_formula is broken

Open awero-manaxiy opened this issue 9 months ago • 2 comments

Please specify an error in the except clause!

There is no 'arcsin' function in sympy, it's named 'asin'. auto_symbolic is fixing with arcsin, which causes the program to output 'make sure all activations need to be converted to symbolic formulas first!' even when every activation is symbolic.

Also ex_round is broken as well. With it, code reliably outputs ZeroDivisionError every time on my data. Ended up rewriting the function with torch.round which fixed the issue.

awero-manaxiy avatar May 12 '24 16:05 awero-manaxiy

Same issue (maybe). When I try to get the the symbolic formula (model.symbolic_formula(var=input_features) I get 'ZeroDivisionError: integer division or modulo by zero'

manuelcugliari avatar May 15 '24 06:05 manuelcugliari

criterion = F.mse_loss model_kan = KAN(width=[5, 10, 10, 10, 1], grid=50, k=3, seed=args.seed, device=device) print(model_kan.device) results = model_kan.train(temp_dataset, opt="LBFGS", steps=10, lamb=0.01, loss_fn=criterion, device=device, lamb_entropy=2.)

I met the same issue.

bozhenhhu avatar May 17 '24 13:05 bozhenhhu

same issue with arcsin

AminMoradiXL avatar Jun 12 '24 22:06 AminMoradiXL