Skip to content

Problem when using fix_symbolic #555

@yjdy

Description

@yjdy

When I try to set automatically or manually set activation functions to be symbolic like hello.ipynb

    self.layer = KAN(width=[dim,2*dim,dim])
    self.layer.fix_symbolic(0,0,0,'sin')
    self.layer.fix_symbolic(0,1,0,'exp')
    self.layer.fix_symbolic(1,0,0,'log')
or

    lib = ['x','exp','log']
    self.layer.auto_symbolic(lib=lib)

I always get the same error:

File "/home/ma-user/anaconda3/envs/xxx/lib/python3.10/site-packages/kan/MultKAN.py", line 947, in fix_symbolic
    x = self.acts[l][:, i]
TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions