KindXiaoming / pykan

Kolmogorov Arnold Networks
MIT License
15.12k stars 1.4k forks source link

Error in saveckpt #492

Closed Jordi- closed 2 weeks ago

Jordi- commented 2 weeks ago

There is an error in saveckpt that happens when the base_fun_name changes from 'silu' to a torch.nn module SiLU(). When yaml serializes to disk with that it makes a mess in the _config.yml file. This makes further uses of checkout, rewind, loadckpt, etc. to fail.

The solution seems to be easy (at least this worked for me). Go to MultKAN.py line 509 and change base_fun_name = model.base_fun_name by base_fun_name = str(model.base_fun_name)

Jordi- commented 2 weeks ago

Sorry, I realized the suggested solution won't work actually.